✨ Added
deferNodeUpdatesinput onNgDiagramMinimapComponent— freezes minimap node positions during drag, resize, and rotation operations, updating only when the interaction ends. Use this to eliminate minimap overhead in large diagrams (#638)watermarkPositionproperty onFlowConfig— allows configuring the watermark corner position viaNgDiagramPanelPosition, with automatic collision avoidance when a panel occupies the same corner (#621, #652) — thanks @jimmeryn for the issue submission! 🙏setViewport(x, y, scale)method onNgDiagramViewportService— sets absolute viewport position and scale in a single call, enabling custom-anchorzoomToFitimplementations (#591, #653) — thanks @MeMeMax for the discussion that led to this! 🙏- Generic type parameters on
NgDiagramModelServicegetter methods (getNodeById,getEdgeById,getConnectedNodes,getConnectedEdges,getChildren,getChildrenNested,getParentHierarchy,getOverlappingNodes,getNodesInRange,getNearestNodeInRange,getNodeEnds) — eliminates the need forascasts when accessing typednode.dataoredge.data(#654) - Exported
DataObjecttype from public API (#654) edgeDrawEndedevent — fires on every linking gesture completion (success and cancel), with source, drop position, and cancel reason (noTarget,invalidConnection,invalidTarget) (#637, #655) — thanks @ninjapiratica for the inspiration! 🙏selectNodeOnPortPressoption onLinkingConfig— whenfalse, port press only initiates linking without selecting the parent node. Defaulttruepreserves existing behavior (#637, #655) — thanks @ninjapiratica for the issue submission! 🙏
🧩 Changed
- Minimap now caches
MinimapNodeDatabyNodeobject reference, reusing cached data for unchanged nodes and reducing per-frame computation during interactions (#638)
🐛 Fixed
initializeModelcan now be safely called inside reactive contexts (computed,effect,linkedSignal) without throwing NG0602 (#608, #622)- Fixed palette drag preview not rendering when an ancestor element has
overflow: hidden(#624) - Fixed port position not updating when
sideororiginPointinput changes at runtime (#647) — thanks @ninjapiratica for the issue submission! 🙏 - Fixed
waitForMeasurementsincurring a 2-second timeout when a transaction includes no-op updates (#648) - Fixed node position not being snapped when node snapping is enabled and node is dropped from palette or pasted onto the canvas (#649)
- Fixed port hitbox (
::beforepseudo-element) not being centered on the port (#650) updateNodeDataandupdateEdgeDatanow accept interfaces and union types — relaxed generic constraint fromRecord<string, unknown> | undefinedtoDataObject(#654)
⚠️ Deprecated
edgeDrawnevent — useedgeDrawEndedinstead, which fires for both successful and cancelled draws.edgeDrawncontinues to fire for backward compatibility (#655)