Skip to content

Commit 1d1b172

Browse files
committed
Merge branch 'master' into feature/proxy
2 parents 34a46fe + e93b598 commit 1d1b172

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
## BUG FIXES
1111

12+
* The default sizing in `ggplotly()` is no longer fixed to the device size inside RStudio. Fixes #1033.
13+
* `event_data("plotly_relayout")` no longer fires `NULL` for any event. Fixes #1039.
1214

1315

1416
# 4.7.0

R/ggplotly.R

+3-5
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ gg2list <- function(p, width = NULL, height = NULL,
172172
# https://github.com/att/rcloud.htmlwidgets/issues/2
173173

174174
# Note that we never have to open a non-interactive device
175-
# in RStudio since it ships with one...
175+
# in RStudio since it ships with one. Plus, calling dev.size()
176+
# adds it to dev.list() & should ensure grid can query the correct device size
176177
rStudioDevSize <- if (is_rstudio()) grDevices::dev.size("px")
177-
width <- width %||% rStudioDevSize[1]
178-
height <- height %||% rStudioDevSize[2]
179-
# note that calling dev.size() (inside RStudio) will add it to the list
178+
180179
if (is.null(grDevices::dev.list())) {
181180
dev_fun <- if (system.file(package = "Cairo") != "") {
182181
Cairo::Cairo
@@ -198,7 +197,6 @@ gg2list <- function(p, width = NULL, height = NULL,
198197
on.exit(grDevices::dev.off(), add = TRUE)
199198
}
200199

201-
202200
# check the value of dynamicTicks
203201
dynamicValues <- c(FALSE, TRUE, "x", "y")
204202
if (length(setdiff(dynamicTicks, dynamicValues))) {

0 commit comments

Comments
 (0)