Skip to content

v1.1.0 - Lifecycle Events & Stabilization

Choose a tag to compare

@piotrblaszczyk piotrblaszczyk released this 27 Feb 13:41
· 63 commits to release since this release
5f36a2f

✨ Added

  • Zoom support in Shortcut Manager - configurable keyboard shortcuts (keyboardZoomIn, keyboardZoomOut) and wheel-based zoom with modifier keys (zoom) via new WheelOnlyShortcutDefinition (#571)
  • Start and end lifecycle events for node interactions: nodeDragStarted/nodeDragEnded, nodeResizeStarted/nodeResizeEnded, nodeRotateStarted/nodeRotateEnded (#572)
  • selectionGestureEnded event - fires on pointerup after a selection gesture completes (object click, box selection, or select-all), providing the currently selected nodes and edges. Use this for actions that should run after selection is done, such as showing toolbars or updating panels (#582)
  • Absolute edge label positioning - positionOnEdge now accepts pixel-based strings ('30px', '-20px') in addition to relative numbers (0–1). Negative pixel values measure from the target end (#580)
  • Default edge now supports positionOnEdge data property to control label positioning (defaults to 0.5) (#581)
  • nodeIds property on DraggingActionState containing IDs of all nodes participating in the drag operation (#572)
  • movementStarted property on DraggingActionState that indicates whether pointer movement exceeded the drag threshold before entering the dragging state (#569)
  • initializeModelAdapter function for initializing custom ModelAdapter implementations. Use this when providing a custom adapter (e.g., backed by localStorage, NgRx, or an external store). The function prepares the adapter for use with ng-diagram. initializeModel continues to create the default SignalModelAdapter from Partial<Model> data. (#586)

🧩 Changed

  • Custom Model example now uses initializeModelAdapter and improved LocalStorageModelAdapter with Partial<Model> and ModelChanges types (#586)

🐛 Fixed

  • Added explicit ModelAdapter return type to initializeModel() to prevent TypeScript errors when building with declaration: true (#573) (thanks @MeMeMax for reporting this 💪)
  • Edge labels vanishing permanently after model reinitialization (#585)
  • Edge labels not being measured when loading a model with pre-existing edge points (e.g., from localStorage) (#586)
  • selectionChanged event now fires after paste action, ensuring selection state stays in sync (#584)
  • Fixed compatibility issue with Angular 18 in default edge and minimap components (#587)