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,
drawingColor = "#1E1E1E"
)
|
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 |
drawingColor |
the color of the drawing output. Default to #1E1E1E (black) |
an HTML canvas element
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | if (interactive()) {
ui <- fluidPage(
use_fabric(),
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.