Skip to content

Commit

Permalink
Allow m parameter to be decreased as well as increased
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavdelius committed Apr 10, 2024
1 parent b649eb4 commit 103ba4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/reproductionControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ reproductionControl <- function(input, output, session, params, params_old,
updateSliderInput(session, "w_max",
min = signif(input$w_max / 2, 2),
max = signif(input$w_max * 1.5, 2))
updateSliderInput(session, "m",
min = signif(input$m / 2, 2),
max = signif(input$m * 1.5, 2))

p@species_params[sp, "w_mat25"] <- input$w_mat * input$wfrac
p@species_params[sp, "w_mat"] <- input$w_mat
Expand Down Expand Up @@ -48,8 +51,8 @@ reproductionControlUI <- function(p, input) {
min = signif(sp$w_max / 2, 2),
max = signif(sp$w_max * 1.5, 2)),
sliderInput("m", "m", value = sp$m,
min = sp$m,
max = sp$m * 2,
min = signif(sp$m / 2, 2),
max = signif(sp$m * 1.5, 2),
step = 0.01)
)
}
Expand Down

0 comments on commit 103ba4b

Please sign in to comment.