Foblex Flow is built around user intent: users drag nodes, create/reassign connections, resize/rotate, select items, pan/zoom the canvas - and the library reports those actions through a consistent event layer.
Important: Foblex Flow events are designed to be final-result events.
During an active drag session the library updates positions internally for smooth UX, and then emits a single “result” event when the action is completed (plus start/end lifecycle events).
This page summarizes what events exist, where to subscribe, and how to use triggers to control when interactions should start. What you get
fLoaded, drag start/end).The event system is how you keep your application state and your backend in sync with what the user did in the editor.
Typical scenarios:
fMoveNodes, fDragEnded).fCreateConnection).fReassignConnection).fNodeSizeChange, fNodeRotateChange, etc.).fSelectionChange).At a high level:
fDraggable orchestrates pointer interactions and runs the internal behavior pipeline.In practice this gives you a clean separation:
fLoaded on f-flowfCanvasChange on f-canvasfNodePositionChange, fNodeRotateChange, fNodeSizeChange on fNodefGroupPositionChange, fGroupRotateChange, fGroupSizeChange on fGroupfSelectionChange on f-flow[fDraggable]fMoveNodesfCreateConnectionfReassignConnectionfConnectionWaypointsChangedfCreateNodefDropToGroupfDragStartedfDragEndedTip: If you persist data, prefer “final” events (for example,
fDragEnded) instead of reacting to every tiny move.
Triggers let you control when a particular behavior should start. For example: only allow moving nodes via a drag-handle, or block connection creation while holding a modifier key.
FEventTrigger = (event: FTriggerEvent) => booleanFTriggerEvent = MouseEvent | TouchEvent | WheelEventUsed in inputs such as:
fCreateConnectionTriggerfReassignConnectionTriggerfConnectionWaypointsTriggerfNodeResizeTriggerfNodeRotateTriggerfNodeMoveTriggerfCanvasMoveTriggerfExternalItemTriggerKeep trigger predicates deterministic and consistent across devices to avoid “random” UX.
FFlowComponent methods (select, clearSelection, getState, etc.) to react to events with controlled updates.Because move events are finalized, persistence becomes simple and efficient:
fMoveNodes,You avoid noisy updates and keep drag silky-smooth.
When the user creates a connection, you usually want to:
Keep validation in one place: the handler for fCreateConnection.
Selection drives inspectors and toolbars.
fSelectionChange to update selected ids in your state..f-dragging, .f-connections-dragging reflect active interaction states..f-selected reflects selected node/connection/group states.[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/drag-start-end-events/drag-start-end-events.component.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/drag-start-end-events/drag-start-end-events.component.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/drag-start-end-events/drag-start-end-events.component.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss