Used for all user interaction with the network. Handles mouse and touch events as well as the navigation buttons and the popups.
The options for the interaction module have to be contained in an object titled 'interaction'.
Click on the full options or shorthand options to show how these options are supposed to be used.
This is a list of all the methods in the public API. They are collected here from all individual modules.
|dragNodes||Boolean|| ||When true, the nodes that are not fixed can be dragged by the user.|
|dragView||Boolean|| ||When true, the view can be dragged around by the user.|
|hideEdgesOnDrag||Boolean|| ||When true, the edges are not drawn when dragging the view. This can greatly speed up responsiveness on dragging, improving user experience.|
|hideNodesOnDrag||Boolean|| ||When true, the nodes are not drawn when dragging the view. This can greatly speed up responsiveness on dragging, improving user experience.|
|hover||Boolean|| ||When true, the nodes use their hover colors when the mouse moves over them.|
|hoverConnectedEdges||Boolean|| ||When true, on hovering over a node, it's connecting edges are highlighted.|
|keyboard||Object or Boolean|| ||When true, the keyboard shortcuts are enabled with the default settings. For further customization, you can supply an object.|
|keyboard.enabled||Boolean|| ||Toggle the usage of the keyboard shortcuts. If this option is not defined, it is set to true if any of the properties in this object are defined.|
|keyboard.speed.x||Number|| ||The speed at which the view moves in the x direction on pressing a key or pressing a navigation button.|
|keyboard.speed.y||Number|| ||The speed at which the view moves in the y direction on pressing a key or pressing a navigation button.|
|keyboard.speed.zoom||Number|| ||The speed at which the view zooms in or out pressing a key or pressing a navigation button.|
|keyboard.bindToWindow||Boolean|| ||When binding the keyboard shortcuts to the window, they will work regardless of which DOM object has the focus. If you have multiple networks on your page, you could set this to false, making sure the keyboard shortcuts only work on the network that has the focus.|
|multiselect||Boolean|| ||When true, a longheld click (or touch) as well as a control-click will add to the selection.|
|navigationButtons||Boolean|| ||When true, navigation buttons are drawn on the network canvas. These are HTML buttons and can be completely customized using CSS.|
|selectable||Boolean||When true, the nodes and edges can be selected by the user.|
|selectConnectedEdges||Boolean||When true, on selecting a node, its connecting edges are highlighted.|
|tooltipDelay||Number|| ||When nodes or edges have a defined |
|zoomView||Boolean|| ||When true, the user can zoom in.|