Description Usage Arguments Value Examples
View source: R/fabric_drawing.R
Create a canvas element for drawing
1 2 3 4 5 6 7 8 | fabric_drawing(
cid,
cwidth = 800,
cheight = 600,
cfill = "#FFFFFF",
drawingWidth = 2,
gumSize = 10
)
|
cid |
the id of the canvas element |
cwidth |
the width of the canvas element |
cheight |
the height of the canvas element |
cfill |
the color of the canvas element. Default to #FFFFFF (white) |
drawingWidth |
the width of the drawing output. Default to 2 |
gumSize |
specify the size of the gum. Defaults to 10 |
an HTML canvas element
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | if (interactive()) {
ui <- fluidPage(
h1("Draw some stuff here"),
fabric_drawing(cid = "canvas1")
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.