DEMOS
DOCS
FEATURES
DOWNLOAD
PURCHASE
CONTACT
BLOG
Show:

jsPlumbToolkit.Widgets.Lasso Class

The Lasso widget allows users to select an area with the mouse. You will not typically need to interact with this widget, or create one manually, since the Surface widget handles all of that for you.

Constructor

jsPlumbToolkit.Widgets.Lasso

(
  • params
)

Parameters:

  • params Object

    Parameters for the widget.

    • pageLocation Function

      Function that can return a page location for an event.

    • canvas Element

      DOM Element on which the Lasso will operate.

    • [invert=false] Boolean optional

      If true, the lasso is drawn as blank space over the selected area, with elements filling the excluded area.

    • [onStart] Function optional

      Optional function to call at the start of a lasso operation.

    • [onEnd] Function optional

      Optional function to call at the end of a lasso operation.

    • [onSelect] Function optional

      Optional function to call on each mousemove during a lasso operation.

    • [filter] String optional

      Optional CSS selector identifying elements that should be filtered and not begin a lasso operation.

Item Index

Methods

isActive

() Boolean

Returns whether or not the lasso is active.

Returns:

Boolean:

true if active, false otherwise.

setEnabled

(
  • e
)

Sets whether or not the lasso responds to mouse events.

Parameters:

  • e Boolean

    Enabled state.