Don't re-run user code when only dimensions change

This commit is contained in:
Winston Chang
2018-04-06 16:30:25 -05:00
parent 10660aa373
commit caac88be0d

View File

@@ -212,8 +212,11 @@ renderCachedPlot <- function(expr, cacheKeyExpr, cacheClearExpr = NULL,
drawReactive <- reactive(label = "plotObj", {
hybrid_chain(
{
width <- fitDims$width
height <- fitDims$height
# Get width/height, but don't depend on them.
isolate({
width <- fitDims$width
height <- fitDims$height
})
# The first execution will have NULL width/height, because they haven't
# yet been retrieved from clientData.
req(width, height, cancelOutput = TRUE)