diff --git a/R/scatterPlot.R b/R/scatterPlot.R index b577b39..9acbd5a 100644 --- a/R/scatterPlot.R +++ b/R/scatterPlot.R @@ -9,6 +9,7 @@ scatterPlotUI <- function(id) { ns <- shiny::NS(id) shiny::tagList(shiny::fluidPage( + shiny::singleton(shiny::tags$head(shiny::tags$link(rel = "stylesheet", type = "text/css", href = "wilson_www/styles.css"))), shiny::fluidRow(shinydashboard::box( width = 12, shiny::div(style = "overflow-y: scroll; overflow-x: scroll; height: 800px; text-align: center", @@ -271,10 +272,12 @@ scatterPlot <- function(input, output, session, data, types, features = NULL, ma result$highlight.labels <- markerReac()$label } else { shiny::showNotification( + id = session$ns("label-limit"), paste("Warning! Label restricted to 100 or less labels. Currently selected:", length(markerReac()$label)), - duration = 10, + duration = NULL, type = "warning" ) + shinyjs::addClass(selector = paste0("#shiny-notification-", session$ns("label-limit")), class = "notification-position-center") } } diff --git a/inst/www/styles.css b/inst/www/styles.css new file mode 100644 index 0000000..dbbbaa8 --- /dev/null +++ b/inst/www/styles.css @@ -0,0 +1,13 @@ +/* notifications */ + +.notification-position-center { + position: fixed; + top: 50%; + left: 40%; + right: 40%; + opacity: 1; +} + +/* slider */ + +/* text input */