Flow Interaction - IRobot1/three-flow-ts GitHub Wiki
FlowInteraction
adds node interaction like dragging, scaling, and resizing within a flow diagram
Constructors
- FlowInteraction(flow: FlowDiagram, renderer: WebGLRenderer, camera: Camera)
- Description: Listens for nodes being added and removed from the diagram to add interaction support
- Parameters:
flow
(FlowDiagram): The flow diagram to be interacted with.renderer
(WebGLRenderer): The WebGL renderer used in the diagram.camera
(Camera): The camera used in the diagram.
- Example:
const flowDiagram = new FlowDiagram(); const flowInteraction = new FlowInteraction(flowDiagram, webGLRenderer, camera);
Properties
- draggable
- Type:
boolean
- Description: Enable or disables draggable for all nodes in the diagram
- Type:
- selectable
- Type:
boolean
- Description: Enable or disables selectable for all nodes in the diagram
- Type:
- resizable
- Type:
boolean
- Description: Enable or disables resizable for all nodes in the diagram
- Type:
- scalable
- Type:
boolean
- Description: Enable or disables scalable for all nodes in the diagram
- Type:
Public Methods
- dispose()
- Description: Cleans up and disposes of resources used by
FlowInteraction
. - Returns:
void
- Usage:
flowInteraction.dispose();
- Description: Cleans up and disposes of resources used by
Events
-
FlowEventType.NODE_ADDED
- Description: Fired when a new node is added.
-
FlowEventType.NODE_SELECTED
- Description: Fired when user clicks on a node, then later off a node.
-
FlowEventType.NODE_REMOVED
- Description: Fired when a node is removed.
-
FlowEventType.DRAGGABLE_CHANGED
- Description: Fired when draggable is changed.
-
FlowEventType.RESIZABLE_CHANGED
- Description: Fired when resizable is changed.
-
FlowEventType.SELECTABLE_CHANGED
- Description: Fired when selectable is changed.
-
FlowEventType.SCALABLE_CHANGED
- Description: Fired when scalable is changed.
-
FlowEventType.DISPOSE
- Description: Fired when flow interaction is disposed.