Creates a new instance of the pan interaction handler.
The NVL instance to attach the interaction handler to
Internal
callbackInternal
Internal
Updates which type of graph elements should hinder panning.
The graph elements that should hinder panning
If true, the node margin will not hinder panning By default, panning is hindered by nodes and relationships.
import { NVL } from '@neo4j-nvl/base'
import { PanInteraction } from '@neo4j-nvl/interaction-handlers'
const nvl = new NVL(document.createElement('div'), [{ id: '0' }], [])
const panInteraction = new PanInteraction(nvl)
// Pan canvas even when dragging on nodes and relationships
panInteraction.updateTargets([], true)
Interaction handler for panning the scene, which is achieved by clicking and moving the scene.
For examples, head to the Pan Interaction documentation page.