interface LassoPluginOptions {
    cssClass?: string;
    filter?: string;
    includeEdges?: boolean;
    invert?: boolean;
    onEnd?: Function;
    onSelect?: ((vertices) => any);
    onStart?: Function;
    selectionFilter?: ((o) => boolean);
}

Hierarchy (view full)

Properties

cssClass?: string

Extra class(es) to add to the lasso's DOM element

filter?: string

Optional CSS3 filter identifying elements you do not want to lasso.

includeEdges?: boolean

Defaults to false. If true, edges are included in the lasso selection.

invert?: 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?: Function

Optional function to call when lasso selection ends.

onSelect?: ((vertices) => any)

Optional function to call when one or more objects has been selected by the lasso.

Type declaration

    • (vertices): any
    • Parameters

      • vertices: Vertex[]

      Returns any

onStart?: Function

Optional function to call when lasso selection starts.

selectionFilter?: ((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

Type declaration

    • (o): boolean
    • Parameters

      • o: Edge | Vertex

        Edge or Vertex to possibly filter.

      Returns boolean