Skip to content

Commit

Permalink
add modal window for gating args controls
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejiang committed Jun 30, 2016
1 parent 092904c commit a3b130b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,18 @@ function(input, output,session){
output$gt_data_plot <- renderPlot(plot(rv$gs))
})

observeEvent(input$gating_method, {
output$gate_args_inputs <- renderUI({
if(input$gating_method == "mindensity"){
list(sliderInput("gate_range", label = "gate_range", min = 0, max = 6, value = c(1,3))
, numericInput("adjust", "adjust", value = 2, min = 1, max = 4, step = 0.5)
, numericInput("num_peaks", "num_peaks", value = 2, min = 1, max = 4, step = 1)
, numericInput("min", "min", value = 0)
, numericInput("max", "max", value = 0)
)
}
})
})
#add and plot the gate
observeEvent(input$bt_apply_gate, {
nodes <- getNodes(rv$gs)
Expand Down
4 changes: 3 additions & 1 deletion R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ library(DT)
library(shinyFiles)
library(networkD3)
library(shinysky)
library(shinyBS)
source("utils.R")
source("import_tab.R")
source("gs_menu_tab.R")
Expand Down Expand Up @@ -103,7 +104,8 @@ body <- dashboardBody(

, div(textInput("gating_args", label="Gating Parameters", value='')
, style="display:inline-block;float:left;")

, bsButton("open_gate_control", "...")
, bsModal("gating_control", "gating_args", "open_gate_control", uiOutput("gate_args_inputs"))
)
)

Expand Down

0 comments on commit a3b130b

Please sign in to comment.