Create an object representing brushing options — brushOpts
R/image-interact-opts.R
Description
This generates an object representing brushing options, to be passed as the
brush argument of imageOutput() or
plotOutput().
Arguments
- id
Input value name. For example, if the value is
"plot_brush", then the coordinates will be available asinput$plot_brush. MultipleimageOutput/plotOutputcalls may share the sameidvalue; brushing one image or plot will cause any other brushes with the sameidto disappear.- fill
Fill color of the brush. If
'auto', it derives from the link color of the plot's HTML container (if thematic is enabled, andaccentis a non-'auto'value, that color is used instead).- stroke
Outline color of the brush. If
'auto', it derives from the foreground color of the plot's HTML container (if thematic is enabled, andfgis a non-'auto'value, that color is used instead).- opacity
Opacity of the brush
- delay
How long to delay (in milliseconds) when debouncing or throttling, before sending the brush data to the server.
- delayType
The type of algorithm for limiting the number of brush events. Use
"throttle"to limit the number of brush events to one everydelaymilliseconds. Use"debounce"to suspend events while the cursor is moving, and wait until the cursor has been at rest fordelaymilliseconds before sending an event.- clip
Should the brush area be clipped to the plotting area? If FALSE, then the user will be able to brush outside the plotting area, as long as it is still inside the image.
- direction
The direction for brushing. If
"xy", the brush can be drawn and moved in both x and y directions. If"x", or"y", the brush wil work horizontally or vertically.- resetOnNew
When a new image is sent to the browser (via
renderImage()), should the brush be reset? The default,FALSE, is useful if you want to update the plot while keeping the brush. UsingTRUEis useful if you want to clear the brush whenever the plot is updated.
See also
clickOpts() for clicking events.