Skip to content

Commit

Permalink
omit sliders in param plot when advanced mode is off
Browse files Browse the repository at this point in the history
  • Loading branch information
martindemko committed Mar 28, 2017
1 parent 66745a1 commit 80bbaaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plot/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down Expand Up @@ -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], ": "),
Expand Down

0 comments on commit 80bbaaa

Please sign in to comment.