Skip to content

Commit

Permalink
Fix #46, though the underlying issue of the brush debouncing behavior…
Browse files Browse the repository at this point in the history
… still exists
  • Loading branch information
tsostarics committed May 15, 2024
1 parent 4bb282d commit e234cc1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/editor_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ openEditor <- function(
value = FALSE,
status = "info")),
shiny::actionButton("clearSelectButton",
"Clear Selection"),
title = "Click to remove selection boxes that won't go away!",
label = "Clear Selection"),
# profvis::profvis_ui("profileUI"),
undoTransformUI('octaveShift'),
shiny::actionButton(
Expand Down Expand Up @@ -473,7 +474,11 @@ openEditor <- function(
# Temporary button to clear the selection, see issue #46
observeEvent(input$clearSelectButton, {
session$resetBrush('plot_brush')
shinyjs::runjs('document.getElementById("pulsePlot_brush").remove()')
shinyjs::runjs('
while (document.getElementById("pulsePlot_brush") != null) {
document.getElementById("pulsePlot_brush").remove()
}
')

})

Expand Down

0 comments on commit e234cc1

Please sign in to comment.