An interaction handler that lets you select nodes and relationships by drawing a lasso around them. When dragging, a line is drawn on the scene and all elements inside are selected.

For examples, head to the Lasso Interaction documentation page.

Hierarchy

Constructors

  • Creates a new instance of the lasso interaction handler.

    Parameters

    • nvl: NVL

      The NVL instance to attach the interaction handler to

    • options: LassoInteractionOptions = ...

      Options for the lasso interaction handler to customize its behavior

    Returns LassoInteraction

Properties

callbackMap: Map<keyof LassoInteractionCallbacks,
    | undefined
    | boolean
    | ((event: MouseEvent) => void)
    | ((__namedParameters: {
        nodes: Node[];
        rels: Relationship[];
    }, event: MouseEvent) => void)>

Accessors

  • get containerInstance(): HTMLElement
  • Internal

    Returns HTMLElement

  • get currentOptions(): P
  • Returns P

  • get nvlInstance(): NVL
  • Internal

    Returns NVL

Methods

  • Internal

    Parameters

    • type: keyof HTMLElementEventMap
    • listener: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    • Optionaloptions: boolean | AddEventListenerOptions

    Returns void

  • Internal

    Parameters

    Returns void

  • Removes all related event listeners and the overlay renderer for the box.

    Returns void

  • Remove a callback for a given event of type.

    Parameters

    • name: string

      The name of the event

    Returns void

  • Internal

    Parameters

    • type: keyof HTMLElementEventMap
    • listener: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    • Optionaloptions: boolean | EventListenerOptions

    Returns void

  • Add or update a callback for a given event of type.

    Parameters

    • name: string

      The name of the event

    • callback:
          | undefined
          | boolean
          | ((event: MouseEvent) => void)
          | ((__namedParameters: {
              nodes: Node[];
              rels: Relationship[];
          }, event: MouseEvent) => void)

      The callback to be called when the event is triggered

    Returns void