amc-heme / scExploreR

Shiny app for single cell omics data visualization
https://amc-heme.github.io/scExploreR/
MIT License
2 stars 0 forks source link

Nested observe statement in plot_module #216

Closed wish1832 closed 1 month ago

wish1832 commented 1 year ago

in R/plot_module.R, the following code was discovered:

## 3.9. Hide title settings menu for blended plots ####
                   # Stopgap solution; custom titles may be supported in the 
                   # future.
                   if (plot_type == "feature"){
                     observe({
                       observe({
                         target_id <- "title_settings"

                         if (isTruthy(plot_selections$blend())){
                           hideElement(
                             id = target_id
                           )
                         } else {
                           showElement(
                             id = target_id
                           )
                         }
                       })
                     })
                   }

There is no need for a nested observe statement, and this could cause bugs. The second observe statement should be removed.

wish1832 commented 1 month ago

The nested observe statement no longer exists on the latest version in main.