improve swithching resoltuion conrtls
Browse files
server.R
CHANGED
|
@@ -42,6 +42,14 @@ server <- function(input, output, session) {
|
|
| 42 |
previous_date_range <- reactiveVal(NULL) # Track previous date range for bi-directional sync
|
| 43 |
|
| 44 |
# --- Reactive Data Sources (Resolution Dependent) ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
current_index <- reactive({
|
| 46 |
req(input$data_resolution)
|
| 47 |
# Identify resolution (default hourly)
|
|
@@ -272,6 +280,9 @@ server <- function(input, output, session) {
|
|
| 272 |
options = pathOptions(pane = "markersPane")
|
| 273 |
)
|
| 274 |
}
|
|
|
|
|
|
|
|
|
|
| 275 |
})
|
| 276 |
|
| 277 |
# --- Selection Logic ---
|
|
|
|
| 42 |
previous_date_range <- reactiveVal(NULL) # Track previous date range for bi-directional sync
|
| 43 |
|
| 44 |
# --- Reactive Data Sources (Resolution Dependent) ---
|
| 45 |
+
observeEvent(input$data_resolution,
|
| 46 |
+
{
|
| 47 |
+
session$sendCustomMessage("freezeUI", list(text = "Switching resolution..."))
|
| 48 |
+
},
|
| 49 |
+
priority = 1000,
|
| 50 |
+
ignoreInit = TRUE
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
current_index <- reactive({
|
| 54 |
req(input$data_resolution)
|
| 55 |
# Identify resolution (default hourly)
|
|
|
|
| 280 |
options = pathOptions(pane = "markersPane")
|
| 281 |
)
|
| 282 |
}
|
| 283 |
+
|
| 284 |
+
# Unfreeze after markers are updated
|
| 285 |
+
session$sendCustomMessage("unfreezeUI", list())
|
| 286 |
})
|
| 287 |
|
| 288 |
# --- Selection Logic ---
|