kartsim_shiny_output: Shiny Widget Output

Description Usage Arguments Examples

Description

Provides a Shiny Widget for Output.

Usage

1
kartsim_shiny_output(outputId, width = "100%", height = "100%")

Arguments

outputId

The identifier for this widget.

width

The width for this widget.

height

The height for this widget.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
library(shiny)

ui <- fluidPage(
  tags$head(
    tags$style(HTML("
      #kartsim {
        height: 270px !important;
        margin-top: 10px;
      }
    "))
  ),
  kartsim_shiny_output("kartsim"),
  textOutput("direction")
)

server <- function(input, output) {
kartsim_shiny_render(
  kartsim_play(size)
)

observeEvent(input$done, {
  input$direction <- input$direction
})
}

if (interactive()) {
  shinyApp(ui = ui, server = server)
}

javierluraschi/hexkart documentation built on May 6, 2019, 8:33 p.m.