Skip to main content
LassoOptions
Options for a lasso
NameTypeDescription
armTimeout?numberTimeout in ms for autoArm long press. Defaults to 500ms.
autoArm?booleanDefaults to false. If true, the lasso will arm itself after a long press.
autoPan?booleanDefaults to true, meaning the canvas will pan automatically to track the lasso
enableInGroups?boolean | "metaKey"Optional setting for whether lasso inside groups is enabled - it is by default. Setting this to false will mean that the user cannot lasso items inside a group. Setting to "metaKey" will mean that lasso is supported inside groups if the user is holding the meta key down (ie the Window key, or Cmd on macs).
invert?booleanSet this to true to have the lasso drawn as set of overlays which mask the whole browser window except for the lassoed area.
mapToGrid?(p:PointXY) => PointXYoptionally users of the lasso can impose a grid on its movement. used internally by the vertex drawing plugin.
onClick?(p:PointXY, e:MouseEvent) => anyWill be invoked if the user does mousedown then mouseup without moving in between. Used by the vertex drawing plugin