LassoPluginOptions
Extends
Properties
armTimeout?
optionalarmTimeout:number
Timeout in ms for autoArm long press. Defaults to 500ms.
autoArm?
optionalautoArm:boolean
Defaults to false. If true, the lasso will arm itself after a long press.
autoExit?
optionalautoExit:boolean
When true (which is the default) the lasso exits after a selection has been made.
cssClass?
optionalcssClass:string
Extra class(es) to add to the lasso's DOM element
enableInGroups?
optionalenableInGroups: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).
filter?
optionalfilter:string| (e) =>boolean
Optional CSS3 filter identifying elements you do not want to lasso
generateLassoContent()?
optionalgenerateLassoContent: (origin,e) =>BrowserElement
Optional function that generates the DOM element for the lasso to use. This is for advanced usage scenarios and most users will not need to supply this.
Parameters
origin
e
MouseEvent
Returns
includeEdges?
optionalincludeEdges:boolean
Defaults to false. If true, edges are included in the lasso selection.
invert?
optionalinvert:boolean
Defaults to false, meaning the lasso is drawn as a rectangle. If true, the lasso is drawn as a set of masks, with the lasso area drawn as a "hole" in the masks.
onEnd?
optionalonEnd:Function
Optional function to call when lasso selection ends.
onSelect()?
optionalonSelect: (vertices) =>any
Optional function to call when one or more objects has been selected by the lasso.
Parameters
vertices
Vertex[]
Returns
any
onStart?
optionalonStart:Function
Optional function to call when lasso selection starts.
selectionFilter()?
optionalselectionFilter: (o) =>boolean
Optional filter that is passed every vertex/edge that the lasso would ordinarily select, and if this function returns false then the vertex/edge is not added to the selection
Parameters
o
Edge or Vertex to possibly filter.
Returns
boolean