Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
scatterPlot: use external css file
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchultheis committed Dec 21, 2017
1 parent d3952a3 commit 26c04f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/scatterPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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")
}
}

Expand Down
13 changes: 13 additions & 0 deletions inst/www/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* notifications */

.notification-position-center {
position: fixed;
top: 50%;
left: 40%;
right: 40%;
opacity: 1;
}

/* slider */

/* text input */

0 comments on commit 26c04f5

Please sign in to comment.