Skip to content

Commit 9006589

Browse files
committed
fix jumping when clicking the same point twice
1 parent 1a5aa95 commit 9006589

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

R/mod_edish.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ edish_server <- function(
283283
mod_return_value <- NULL
284284
if (!is.null(on_sbj_click)) {
285285
shiny::observe({
286-
shiny::req(!is.null(plotly::event_data("plotly_click", source = session[["ns"]]("plot"))))
286+
shiny::req(!is.null(plotly::event_data(
287+
event = "plotly_click",
288+
source = session[["ns"]]("plot"),
289+
priority = "event" # needed when clicking the same point twice
290+
)))
287291
on_sbj_click()
288292
})
289293
mod_return_value <- list(

tests/testthat/setup.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ test_communication_with_papo <- function(mod, data, trigger_input_id) {
8282
# Module outputs selection once
8383
testthat::expect_equal(exports[["ret_value"]], subject_ids[[i]])
8484
testthat::expect_equal(exports[["update_count"]], i)
85-
# print(exports[["update_count"]])
8685
}
8786

8887
app$stop()

0 commit comments

Comments
 (0)