library(shiny)
library(shinyXYpad)
ui <- fluidPage(
fluidRow(
column(
6,
XYpadInput("xy1", onMove = TRUE, label = "XY pad - on move")
),
column(
6,
XYpadInput(
"xy2", label = "XY pad - on release",
displayXY = FALSE, displayPrevious = FALSE
)
)
),
fluidRow(
column(6, verbatimTextOutput("xy1value")),
column(6, verbatimTextOutput("xy2value"))
)
)
server <- function(input, output, session){
output[["xy1value"]] <- renderPrint({ input[["xy1"]] })
output[["xy2value"]] <- renderPrint({ input[["xy2"]] })
}
if(interactive()){
shinyApp(ui, server)
}
Run the code above in your browser using DataLab