From 4dca94ac99afa6006680fc2d3594ca5d8b6762d4 Mon Sep 17 00:00:00 2001 From: Winston Chang Date: Wed, 4 Apr 2018 15:48:01 -0500 Subject: [PATCH] Code reorganization --- R/render-cached-plot.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/render-cached-plot.R b/R/render-cached-plot.R index 9514bdce3..c52d8b834 100644 --- a/R/render-cached-plot.R +++ b/R/render-cached-plot.R @@ -105,6 +105,12 @@ renderCachedPlot <- function(expr, cacheKeyExpr, cacheInvalidationExpr = NULL, env = parent.frame(), quoted = FALSE, outputArgs = list() ) { + # This ..stacktraceon is matched by a ..stacktraceoff.. when plotFunc + # is called + installExprFunction(expr, "func", env, quoted, ..stacktraceon = TRUE) + + args <- list(...) + cacheKey <- reactive(substitute(cacheKeyExpr), env = parent.frame(), quoted = TRUE) cacheInvalidation <- reactive(substitute(cacheInvalidationExpr), @@ -187,12 +193,6 @@ renderCachedPlot <- function(expr, cacheKeyExpr, cacheInvalidationExpr = NULL, } ) - # This ..stacktraceon is matched by a ..stacktraceoff.. when plotFunc - # is called - installExprFunction(expr, "func", env, quoted, ..stacktraceon = TRUE) - - args <- list(...) - possible_dims <- all_possible_dims(baseWidth, aspectRatioRate, growthRate) # The width and height of the plot to draw, taken from possible_dims. These