From 80bbaaa621d58a3b2f9788e355267fe06f4559eb Mon Sep 17 00:00:00 2001 From: martindemko <325073@mail.muni.cz> Date: Tue, 28 Mar 2017 23:28:10 +0200 Subject: [PATCH] omit sliders in param plot when advanced mode is off #51 --- plot/plot.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plot/plot.R b/plot/plot.R index e31f7f3..cf23662 100644 --- a/plot/plot.R +++ b/plot/plot.R @@ -118,7 +118,8 @@ createBasePlot <- function(varNames, varThresholds, varContinuous, useProjection vars <- lapply(1:plot$varCount, function(i) { if (i == dim$x || i == dim$y) { NULL - } else if (plot$useProjections && unwrapOr(input[[plot$project[i]]], TRUE)) { + } else if ( !input[["advanced"]] || # setting advanced mode off will omit checkboxes and sliders + (plot$useProjections && unwrapOr(input[[plot$project[i]]], TRUE))) { NULL } else { r <- unwrapOr(input[[plot$sliders[i]]], if(plot$varContinuous[i]) { plot$varRanges[[i]]$min } else { 1 }) @@ -275,7 +276,7 @@ createBasePlot <- function(varNames, varThresholds, varContinuous, useProjection conditionalPanel(condition = paste0("input.", plot$project[var], " == false"), plot$renderSlider(var) ) - ) + ) } else { tagList( paste0(if (plot$varContinuous[var]) "Continuous value of " else "Discrete value of ", plot$varNames[var], ": "),