Commit a3700aba authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

bugfix tables modification will no more be reinitialise

parent 7245c3fc
......@@ -64,6 +64,7 @@ simul_params_genes <- shiny::reactiveVal()
# msg : message to print
# level : level of output (0 no output, 3 all output)
printVerbose <- function(msg, level=ACTIVE_DEBUG) {
if(level == 2) print(msg)
if(level >= 3) cat(file=stderr(),"### DEBUG ",msg,"\n")
}
......
......@@ -668,6 +668,7 @@ server <- function(input, output, session) {
shiny::observeEvent(input$runSimulation, {
shinyjs::click("showOutputside")
printVerbose(simul_params, level=2)
withProgress(message = "Running Simulation, please wait...", value = 0, {
progressBar <- Progress$new()
progressBar$set(value = NULL, message = "Running Simulation, please wait...")
......@@ -946,7 +947,7 @@ server <- function(input, output, session) {
colnames(simul_params@CultivarsGenes) <<- genesTable$data[, 1]
# if (nrow(simul_params@CultivarsGenes) != 0)
rownames(simul_params@CultivarsGenes) <<- c(cultivarsTable$data[, "cultivarName"])
printVerbose(paste0("update",simul_params@CultivarsGenes))
printVerbose(paste0("update CultivarsGenes",simul_params@CultivarsGenes))
simul_params_cultivarsgenes(simul_params@CultivarsGenes)
# update cultivars
......@@ -992,10 +993,7 @@ server <- function(input, output, session) {
can_run_simul$cultivarsgenes <<- FALSE
}
else {
#print(simul_params@CultivarsGenes)
#print(cultivars_genesTable$data)
simul_params@CultivarsGenes <- cultivars_genesTable$data
#print(simul_params@CultivarsGenes)
simul_params@CultivarsGenes <<- cultivars_genesTable$data
simul_params_cultivarsgenes(simul_params@CultivarsGenes)
can_run_simul$cultivarsgenes <<- TRUE
}
......@@ -1047,7 +1045,6 @@ server <- function(input, output, session) {
# rename genes in cultivars genes table
# remove line -> remove genes in cultivars genes
if (genesTable$col == 0 && nrow(simul_params@Genes) > nrow(genesTable$data)) {
#print(simul_params@CultivarsGenes)
simul_params@CultivarsGenes <<- simul_params@CultivarsGenes[, -c(genesTable$row), drop = FALSE]
printVerbose(paste0("set Cultivars Genes ",simul_params@CultivarsGenes))
}
......
......@@ -26,7 +26,7 @@ landscapeTab <- {
selected = 1,
)
),
shinyBS::bsTooltip("landscape",title="Landscape Shapefile", placement = "bottom", trigger="hover"),
shinyBS::bsTooltip("landscape",title="Landscape Shapefile", placement = "top", trigger="hover"),
column(
width = 6,
shiny::selectInput(
......@@ -41,7 +41,7 @@ landscapeTab <- {
)
)
),
shinyBS::bsTooltip("aggregLevel",title="Level of spatial aggregation of the landscape", placement = "bottom", trigger="hover"),
shinyBS::bsTooltip("aggregLevel",title="Level of spatial aggregation of the landscape", placement = "top", trigger="hover"),
hr(),
shiny::fluidRow(
tags$div(lang="en",
......@@ -253,7 +253,7 @@ pathogenTab <- {
inputUi <- {
shiny::sidebarPanel(
id = "inputpanel",
shiny::h3("Input"),
shiny::h3("Input", align = "center"),
shiny::div(
shiny::selectInput(
inputId = "demo",
......@@ -268,7 +268,7 @@ inputUi <- {
),
align = "center"
),
shinyBS::bsTooltip("demo",title="Load existing parameters or click Advanced Mode", placement = "bottom", trigger="hover"),
shinyBS::bsTooltip("demo",title="Load existing parameters or click Advanced Mode", placement = "top", trigger="hover"),
shiny::tabsetPanel(id = "inputtabpanel", landscapeTab, cultivarTab, pathogenTab),
width = 12,
align = "center"
......@@ -311,16 +311,16 @@ ui <- {
titlePanel("Landsepi : Landscape Epidemiology and Evolution"),
actionButton("About", "About"),
actionButton("Mode", "Advanced Mode On/Off", icon = icon("exchange-alt")),
shinyBS::bsTooltip("Mode",title="Edit parameters", placement = "top", trigger="hover"),
shinyBS::bsTooltip("Mode",title="Edit all input parameters", placement = "top", trigger="hover"),
align="center"),
shiny::br(),
fluidRow(
actionButton("showInputside", label = "", icon = icon("wpforms")),
shinyBS::bsTooltip("showInputside",title="Only show parameters", placement = "bottom", trigger="hover"),
shinyBS::bsTooltip("showInputside",title="Only show input parameters", placement = "bottom", trigger="hover"),
actionButton("showBothside", label = "", icon = icon("columns")),
shinyBS::bsTooltip("showBothside",title="Show both, parameters and outputs", placement = "bottom", trigger="hover"),
shinyBS::bsTooltip("showBothside",title="Show both, input parameters and output", placement = "bottom", trigger="hover"),
actionButton("showOutputside", label = "", icon = icon("chart-line") ),
shinyBS::bsTooltip("showOutputside",title="Only show outputs", placement = "bottom", trigger="hover"),
shinyBS::bsTooltip("showOutputside",title="Only show output", placement = "bottom", trigger="hover"),
align="center"
),
shiny::br(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment