Implement execOnResize

This commit is contained in:
Joe Cheng
2017-04-13 15:55:36 -07:00
parent e15654f265
commit 5e905aa73e
2 changed files with 2 additions and 1 deletions

View File

@@ -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) {