Description Usage Arguments Details Value Author(s) Examples
The brush size is changed by the differences in two successive mouse positions.
1 | update_brush_size(meta, event)
|
meta |
the meta data containing the brush information ( |
event |
the event in the callback (if missing, it will search in the
parent environment |
The current mouse position is obtained from event$pos()
. If the brush
is in the move mode (meta$brush.move == TRUE
; often set in a mouse
click event), the brush size is updated by the differences between
meta$start
and meta$pos
; the former is the starting position of
the mouse, and the latter is the current position.
a matrix of the coordinates of the brush rectangle, which can be
passed to qrect
and used to query the brushed
elements by layer$locate()
; as a side effect, the brush size is
updated, unless it is only a single click or the brush is not in the move
mode
Yihui Xie <http://yihui.name>
1 | ## see source code of qparallel()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.