inst/IAOPeptideReader/server.R

source(file.path("server", "plot_settings.R"), local = TRUE, chdir = TRUE)
source(file.path("server", "input_settings.R"), local = TRUE, chdir = TRUE)
source(file.path("server", "modals.R"), local = TRUE, chdir = TRUE)


# Main server function ---------------------------------------------------------
server <- function(input, output, session) {

    # Poke the handler to initialize the iaopr JS variable with a new
    # IAOPeptideReader class object. The 1 is sent because something has to be
    # sent for the handler to work.
    session$sendCustomMessage("initialize_iaopr", 1)

    plot_settings(input, output, session)
    input_settings(input, output, session)
    modals(input, output, session)

    observeEvent(input[["download_svg"]], {
        session$sendCustomMessage("download_svg", 1)
    }, ignoreInit = TRUE)
}
hadexversum/iaoreader documentation built on March 9, 2021, 2:04 p.m.