Skip to content

Commit

Permalink
controls appearance: use virtual select
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Mar 12, 2024
1 parent 90d94ae commit fe57bd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ importFrom(shinyWidgets,updateNumericInputIcon)
importFrom(shinyWidgets,updatePickerInput)
importFrom(shinyWidgets,updatePrettyCheckboxGroup)
importFrom(shinyWidgets,updateProgressBar)
importFrom(shinyWidgets,virtualSelectInput)
importFrom(stats,setNames)
importFrom(tools,toTitleCase)
importFrom(utils,browseURL)
Expand Down
16 changes: 8 additions & 8 deletions R/module-controls-appearance.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @importFrom utils head
#' @importFrom htmltools tagList tags
#' @importFrom shinyWidgets pickerInput radioGroupButtons colorPickr
#' @importFrom shinyWidgets radioGroupButtons colorPickr virtualSelectInput
controls_appearance_ui <- function(id) {

ns <- NS(id)
Expand All @@ -28,6 +28,7 @@ controls_appearance_ui <- function(id) {
)

tags$div(
class = "esquisse-controls-appearance-container",
style = css(
maxHeight = "80vh",
overflowY = "auto",
Expand Down Expand Up @@ -78,26 +79,25 @@ controls_appearance_ui <- function(id) {
),
tags$div(
id = ns("controls-shape"), style = "display: none;",
pickerInput(
shinyWidgets::virtualSelectInput(
inputId = ns("shape"),
label = i18n("Point symbol:"),
choices = shape_names,
selected = "circle",
options = list(size = 10, container = "body"),
dropboxWrapper = ".esquisse-controls-appearance-container",
optionsCount = 5,
width = "100%"
)
),
pickerInput(
shinyWidgets::virtualSelectInput(
inputId = ns("theme"),
label = i18n("Theme:"),
choices = themes,
selected = getOption("esquisse.default.theme", default = "theme_minimal"),
options = list(size = 10, container = "body"),
dropboxWrapper = ".esquisse-controls-appearance-container",
optionsCount = 5,
width = "100%"
),
tags$script(
paste0("$('#", ns("theme"), "').addClass('dropup');")
),
radioGroupButtons(
inputId = ns("legend_position"),
label = i18n("Legend position:"),
Expand Down

0 comments on commit fe57bd8

Please sign in to comment.