From ca51f00bdaec323a08180d9861304bca0cfca17c Mon Sep 17 00:00:00 2001 From: thierrychambert <thierry.chambert@gmail.com> Date: Tue, 17 Aug 2021 16:48:06 +0200 Subject: [PATCH] Shiny : Show impact_text (simple) only for non-cumulated impact analysis. Need to include tableOutput to display the impact of each wind farm in case of a cumulated impact analysis. --- inst/ShinyApp/server.R | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/inst/ShinyApp/server.R b/inst/ShinyApp/server.R index 2c837e6..0f41e3e 100644 --- a/inst/ShinyApp/server.R +++ b/inst/ShinyApp/server.R @@ -512,9 +512,10 @@ server <- function(input, output, session){ ##------------------------------- ## Cumulated impacts or not ? ##------------------------------- - observeEvent({ - input$run - }, { + #observeEvent({ + # input$run + #}, { + observe({ if(input$analysis_choice == "scenario"){ param$cumulated_impacts = FALSE } else { @@ -740,7 +741,13 @@ server <- function(input, output, session){ } # Display result (text) - output$impact_text <- renderText({ print_out() }) + output$impact_text <- renderText({ + if(!param$cumulated_impacts){ + print_out() + } else{ + NULL + } + }) # Plot Impacts plot_out_impact <- function(){ -- GitLab