R/fullScreenModule.R

Defines functions fullScreen fullScreenUI

Documented in fullScreen fullScreenUI

#' @title Create a fullScreen UI module
#'
#' @description Trigger a fullScreen mode. Based on
#' https://stackoverflow.com/questions/42371164/how-to-run-r-shiny-app-in-full-sized-window
#'
#' @param id module id.
#'
#' @export
fullScreenUI <- function(id) {
  ns <- NS(id)
  tags$li(
    title = "",
    class = "dropdown",
    tagAppendAttributes(
      shinyWidgets::actionBttn(
        inputId = ns("fullscreen"),
        label = "",
        icon = icon("expand"),
        style = "fill",
        color = "default",
        size = "lg",
        block = FALSE,
        no_outline = TRUE
      ),
      onclick = "shinyjs.toggleFullScreen();"
    )
  )
}





#' @title Create a fullScreen server logic
#'
#' @description Nothing is contained inside for now...
#'
#' @param input Shiny inputs
#' @param output Shiny Outputs
#' @param session Session object.
#'
#' @export
fullScreen <- function(input, output, session) {}

Try the CaPO4Sim package in your browser

Any scripts or data that you put into this service are public.

CaPO4Sim documentation built on Sept. 11, 2024, 7:20 p.m.