Skip to content

Commit 6908c3a

Browse files
committed
Obtain width/height from built plot. Fixes #365
1 parent 5649926 commit 6908c3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/print.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ toWidget <- function(x) {
3939
htmlwidgets::createWidget(
4040
name = "plotly",
4141
x = p,
42-
width = x$width,
43-
height = x$height,
42+
width = p$width,
43+
height = p$height,
4444
htmlwidgets::sizingPolicy(
4545
padding = 5,
4646
browser.fill = TRUE

0 commit comments

Comments
 (0)