@@ -35,7 +35,7 @@ server <- function(input, output, session) {
3535 shinyjs :: runjs(' $(document).on("click", ".dropdown-menu", function (e) {
3636 e.stopPropagation();
3737 });
38- window.onbeforeunload = function(e) {
38+ shinyjs. window.onbeforeunload = function(e) {
3939 e = e || window.event;
4040 if (e) {
4141 e.returnValue = "Sure?";
@@ -65,7 +65,7 @@ server <- function(input, output, session) {
6565 observeEvent(input $ uploadButton , {
6666 no_raw_directory_selected <- is.null(input $ rawDataDirectory $ datapath )
6767 no_processed_file_selected <- is.null(input $ processedDataPath $ datapath )
68-
68+
6969 if (no_raw_directory_selected & no_processed_file_selected ) {
7070 trackeRapp ::: show_warning_no_data_selected()
7171 }
@@ -82,7 +82,7 @@ server <- function(input, output, session) {
8282 to <- file.path(dirname(from ), basename(input $ rawDataDirectory $ name ))
8383 file.rename(from , to )
8484 directory <- dirname(to [1 ])
85- # # Process raw data
85+ # # Process raw data
8686 raw_data <- trackeRapp ::: read_directory_shiny(
8787 directory = directory ,
8888 timezone = " GMT" ,
@@ -148,7 +148,7 @@ server <- function(input, output, session) {
148148 # # Sessions selected from plots using box/lasso selection
149149 observeEvent(plotly :: event_data(" plotly_selected" ), {
150150 trackeRapp ::: generate_selected_sessions_object(data , input ,
151- plot_selection = TRUE )
151+ plot_selection = TRUE )
152152 DT :: selectRows(proxy = proxy , selected = data $ selected_sessions )
153153 shinyWidgets :: updatePickerInput(session = session , inputId = " metricsSelected" ,
154154 selected = selected_metrics(),
@@ -205,7 +205,7 @@ server <- function(input, output, session) {
205205
206206 # # Uploading sample dataset
207207 observeEvent(input $ uploadSampleDataset , {
208- removeModal()
208+ removeModal()
209209 filepath <- system.file(" extdata/sample.rds" , package = " trackeRapp" )
210210 data $ object <- readRDS(filepath )
211211 # # See helper file
@@ -226,14 +226,6 @@ server <- function(input, output, session) {
226226
227227 # # Message and actions on firefox issues
228228 shinyjs :: runjs(' Shiny.setInputValue("browser", bowser.name);' )
229- # # observeEvent(input$browser, {
230- # # if (grepl("firef", input$browser, ignore.case = TRUE)) {
231- # # shinyjs::show(id = "firefoxmessage")
232- # # shinyjs::disable(id = "resetButton")
233- # # shinyjs::disable(id = "uploadButton")
234- # # shinyjs::disable(id = "download_data")
235- # # }
236- # # })
237229
238230 # # Session summaries page
239231 observeEvent(input $ createDashboard , {
@@ -321,8 +313,8 @@ server <- function(input, output, session) {
321313 })
322314
323315 deselected_data <- reactive({
324- sessions <- seq_along(data $ object )[data $ is_location_data ]
325- sessions <- sessions [! (sessions %in% data $ selected_sessions )]
316+ sessions <- seq_along(data $ object )[data $ is_location_data ]
317+ sessions <- sessions [! (sessions %in% data $ selected_sessions )]
326318 if (length(sessions )) {
327319 out <- trackeRapp ::: get_coords(data , sessions = sessions , keep = opts $ coordinates_keep )
328320 out $ col <- ifelse(out $ sport == " running" ,
@@ -352,10 +344,10 @@ server <- function(input, output, session) {
352344 des <- deselected_data()
353345 incProgress(1 / 2 , detail = " Preparing routes" )
354346 # # FIXME: mapdeck gets confused with the tooltips if we do not do the below
355- incProgress(1 / 1 , detail = " Mapping" )
347+ incProgress(1 / 1 , detail = " Mapping" )
356348 if (! is.null(des )) {
357349 p <- mapdeck :: mapdeck_update(map_id = " map" )
358- p <- mapdeck :: clear_path(p , " deselection_path" )
350+ p <- mapdeck :: clear_path(p , " deselection_path" )
359351 p <- mapdeck :: add_path(p ,
360352 data = des ,
361353 stroke_colour = paste0(opts $ summary_plots_deselected_colour , " 80" ),
0 commit comments