R shiny brush can not be removed by any means. Can anyone help me?

31 views Asked by At

in an R shiny app, I am trying to implement a zoom functionality and found that SOME brush rectangles can not be removed from the plots by any means I found. Remaining brush rectangles

I tried several programming solutions, including:

  • resetOnNew = T
  • session$resetBrush(input$brush_zoom)
  • runjs("document.getElementById('brush_zoom').remove()") with the shinyjs library

Any of these seem to work - most of the time, but not always. Now, I found that the non-deletable rectangles seem to be from brush strokes, where I pulled a rectangle open and made it a bit smaller again before releasing the mouse. If I pull the rectangle open and release the mouse, they are reset.

Does anyone else have this problem and hopefully a solution? Thank you so much!

0

There are 0 answers