# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#' special reactive functions
#'
#' requires R6 methods
#'
#' @include utils_R6.R
#' @include fct_integration.R
#' dMeasureAppointments needs to be defined
NULL
##### special reactive functions ##########################
.private(dMeasureAppointments, "set_reactive", function(myreactive, value) {
# reactive (if shiny/reactive environment is available) is set to 'value'
# myreactive is passed by reference
if (requireNamespace("shiny", quietly = TRUE)) {
myreactive(value)
}
})
.private(dMeasureAppointments, "trigger", function(myreactive) {
# toggles a reactive between (usually) 0 and 1
if (requireNamespace("shiny", quietly = TRUE)) {
myreactive(1 - shiny::isolate(myreactive()))
}
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.