ngDiagram v1.2.3 - invalidateMeasurements & zOrdering rework #705
lukasz-jazwa
announced in
Announcements
Replies: 1 comment
-
|
Nice update, thank you 🔥 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ngDiagram v1.2.3
This is a minor version bump, but it includes important fixes we want to highlight.
Z-index system reworked
We rewrote the z-index assignment middleware and
bringToFront/sendToBackcommands. Children are now always rendered above their parent group regardless ofzOrdervalues, and siblings within a group correctly re-sort whenzOrder, selection, or group membership changes.Read more about z-ordering: https://www.ngdiagram.dev/docs/guides/z-ordering/
Invalidate measurements for dynamically changed ports
This one was a long-standing pain point. When ports change position through CSS or HTML changes (class toggles, style bindings, reordering in an array), ngDiagram had no way to detect it - internal
ResizeObserveronly fires on size changes, and auto-detecting every DOM change would hurt performance too much. This resulted in stale measurements and edges not following new port positions. It only worked for ports/node that changed size, or were moved by changingsideororiginPointinputs.Now you can explicitly tell the library to re-measure via invalidateMeasurements()
Read more on: https://www.ngdiagram.dev/docs/guides/nodes/ports/#port-measurement.
Full changelog: https://www.ngdiagram.dev/docs/changelog/
Beta Was this translation helpful? Give feedback.
All reactions