Skip to content

Commit 957923c

Browse files
committed
cleanup
1 parent 35ae74a commit 957923c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

R/ggplotly.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ ggplotly.ggmatrix <- function(p = ggplot2::last_plot(), width = NULL,
5959
# conditioned on a column in a ggmatrix, the x-axis should be on the
6060
# same scale.
6161
s <- subplot(columnList, nrows = p$nrow, margin = 0.01, shareX = TRUE, titleY = TRUE)
62-
#if (i == 3) browser()
6362
subplotList <- c(subplotList, list(s))
6463
}
65-
s <- subplot(subplotList, nrows = 1)
64+
s <- layout(subplot(subplotList, nrows = 1), width = width, height = height)
6665
if (nchar(p$title) > 0) {
6766
s <- layout(s, title = p$title)
6867
}
69-
layout(s, width = width, height = height)
68+
hash_plot(pm$data, plotly_build(s))
7069
}
7170

7271
#' @export
@@ -690,8 +689,8 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
690689
l <- list(data = setNames(traces, NULL), layout = compact(gglayout))
691690
# ensure properties are boxed correctly
692691
l <- add_boxed(rm_asis(l))
693-
l$layout$width <- width
694-
l$layout$height <- height
692+
l$width <- width
693+
l$height <- height
695694
l$source <- source
696695
structure(l, class = "plotly_built")
697696
}

0 commit comments

Comments
 (0)