Skip to content
  1. API
  2. Ogma
  3. tools

Ogma.tools.lasso

Lasso API: functions to select nodes and edges by drawing a lasso.

ogma.tools.lasso.disable()

Disables lasso tool.

ogma.tools.lasso.enable([options])

Enables the lasso selection tool

Arguments

  • options(optional) object
    • bothExtremities(optional) boolean[=false] If set to true, edge will be passed to callback only if both of its ends are inside the selected area. By default, just one endpoint inside the selection is enough to be included.
    • callback(optional) function(payload: {nodes: NodeList, edges: EdgeList}) Called with the nodes and edges surrounded by the lasso. By default, add the nodes to the selection (edges are ignored).
    • cursorStyle(optional) CursorStyle[="cell"] Cursor style when the lasso is active (CSS property)
    • fillColor(optional) Color[="rgba(0,195,255,0.1)"] Lasso fill color
    • strokeColor(optional) Color[="#00C3FF"] Lasso stroke color
    • strokeWidth(optional) number[=1] Lasso stroke width

ogma.tools.lasso.enabled()

Check whether the lasso tool is enabled.

Returns

  • boolean