Skip to content

Commit

Permalink
fix #398
Browse files Browse the repository at this point in the history
  • Loading branch information
tmelliott committed Jan 6, 2025
1 parent b759137 commit e1a64b5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
- Refactor data wrangling methods for new `iNZightTools` 2.0.0 API.
- Maps module has been removed following major changes/restructuring to dependent packages that we are unable to resolve at this time. Please get in touch if you used this module or would like to help us fix it.

## Patch 2024.01.01

- fix bug where double-clicking sig fig up/down would cause an infinite loop

---

# December 2023
Expand Down
4 changes: 2 additions & 2 deletions panels/C1_Visualize/1_visualize-panel-ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ vis.mainPanel <- function() {
)
),
column(
2,
3,
numericInput("global.round.pct",
label = "Round percentages",
label = "Round percentages (decimal places)",
value = graphical.par$round_percent,
min = 0, step = 1
)
Expand Down
51 changes: 38 additions & 13 deletions panels/C1_Visualize/infoWindow.R
Original file line number Diff line number Diff line change
Expand Up @@ -727,35 +727,60 @@ output$visualize.summary <- renderPrint({
}
})


blockSF <- FALSE
observeEvent(input$global.sig.level.inf, {
if (blockSF) {
return()
}
blockSF <<- TRUE
updateNumericInput(session,
inputId = "global.sig.level",
value = input$global.sig.level.inf
)
graphical.par$signif <- input$global.sig.level.inf
blockSF <<- FALSE
})
# other way around
observeEvent(input$global.sig.level, {
if (blockSF) {
return()
}
blockSF <<- TRUE
updateNumericInput(session,
inputId = "global.sig.level.inf",
value = input$global.sig.level
)
graphical.par$signif <- input$global.sig.level.inf
blockSF <<- FALSE
})

# same for rounding
observeEvent(input$global.round.pct.inf, {
updateNumericInput(session,
inputId = "global.round.pct",
value = input$global.round.pct.inf
)
graphical.par$round_percent <- input$global.round.pct.inf
})
observeEvent(input$global.round.pct, {
updateNumericInput(session,
inputId = "global.round.pct.inf",
value = input$global.round.pct
)
})
# blockRounding <- FALSE
# observeEvent(input$global.round.pct.inf, {
# if (blockRounding) {
# return()
# }
# blockRounding <<- TRUE
# updateNumericInput(session,
# inputId = "global.round.pct",
# value = input$global.round.pct.inf
# )
# graphical.par$round_percent <- input$global.round.pct.inf
# blockRounding <<- FALSE
# })
# observeEvent(input$global.round.pct, {
# if (blockRounding) {
# return()
# }
# blockRounding <<- TRUE
# updateNumericInput(session,
# inputId = "global.round.pct.inf",
# value = input$global.round.pct
# )
# graphical.par$round_percent <- input$global.round.pct.inf
# blockRounding <<- FALSE
# })

observeEvent(input$global.p.val, {
graphical.par$min_pval <- input$global.p.val
Expand Down

0 comments on commit e1a64b5

Please sign in to comment.