canvasBtn: Screenshot a plot or UI to SPS Canvas or download as an image

Description Usage Arguments Value Examples

View source: R/canvas.R

Description

A upper level function of drawer::toCanvasBtn. You should only use it under SPS projects. For you own apps, still use the drawer::toCanvasBtn.

Usage

1
canvasBtn(dom, id = "", isID = TRUE, class = "text-center", placement = "top")

Arguments

dom

a HTML DOM selector, mostly common is to select the element by ID:

e.g. a plot with ID "plot1", to select, use dom = "plot1" to select the plot if isID = TRUE. If isID = FALSE, use dom = "#plot1"

Other complex selector is supported. First turn isID = FALSE, then try things like dom = ".btn i" selects an icon inside an element with "btn" class. If more than one element is matched, only the first one will be screenshoted.

id

ID of this button, optional.

isID

bool, if the dom argument is selected by ID or other selector

class

string, length 1, other html class add to the button wrapper

placement

where should the tiptool place, top, bottom, left, right.

Value

a button group with several options

Examples

1
canvasBtn("#mydiv")

systemPipeShiny documentation built on March 16, 2021, 6:01 p.m.