Neo4j Visualization Library
    Preparing search index...

    Opinionated interaction handler for keyboard-driven focus navigation through graph elements (nodes and relationships).

    By default, Tab / Shift+Tab cycle focus through elements, Escape exits the graph, and Shift+F10 call the onContextMenu callback with the focused element. While a node is focused, the arrow keys move the selected node(s), or the focused node when nothing is selected, by moveStep screen pixels - or by largeMoveStep while the large step modifier (Shift by default) is held. All keys can be reconfigured via KeyboardInteractionOptions.

    Callbacks are fired for focus/blur transitions and context-menu activation, following the same one-way data-flow pattern as the other interaction handlers.

    Hierarchy

    Index
    • get currentOptions(): P

      Returns the current options of the interaction.

      Returns P

      The current options of the interaction.

    • Removes all related event listeners from the container.

      Returns void

    • Returns the currently focused element, if any.

      Returns Node | Relationship | undefined

    • Remove a callback for a given event of type.

      Parameters

      • name: string

        The name of the event.

      Returns void

    • Enables or disables global text selection during a drag or pan operation.

      Parameters

      • enable: boolean

        Whether to enable or disable global text selection.

      • OptionaleventFunction: (this: HTMLElement, ev: MouseEvent) => void

        The event function to be added/removed when text selection is disabled/enabled.

      Returns void

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

      Parameters

      • name: string

        The name of the event.

      • callback: boolean | ((...args: unknown[]) => void)

        The callback to be called when the event is triggered.

      Returns void