diff --git a/R/render-plot.R b/R/render-plot.R index 9ab869974..8fe0dc02c 100644 --- a/R/render-plot.R +++ b/R/render-plot.R @@ -95,7 +95,7 @@ renderPlot <- function(expr, width='auto', height='auto', res=72, ..., # displaylist, which is resolution independent. drawReactive <- reactive({ # Don't invalidate when width/height changes. - dims <- isolate(getDims()) + dims <- if (execOnResize) getDims() else isolate(getDims()) pixelratio <- session$clientData$pixelratio %OR% 1 p1 <- drawPlot(name, session, func, dims$width, dims$height, pixelratio, res) p1 <- promise::catch(p1, function(reason) { diff --git a/TODO-promises.md b/TODO-promises.md index e943d2f85..15cb6dc12 100644 --- a/TODO-promises.md +++ b/TODO-promises.md @@ -5,3 +5,4 @@ - [x] Brushing not working; the mapping is null for ggplot. - [ ] ..stacktraceon../..stacktraceoff.. and stack traces in general - [ ] Non-async render functions should have their code all execute on the current tick. Otherwise order of execution will be surprising if they have side effects and explicit priorities. +- [x] Respect execOnResize