Import it from @grafloria/engine.
The LAST-KNOWN ANCHOR of a node the diagram has REMOVED.
A removed parent leaves soft refs behind by design (children's parentId, group
members) — hard-clearing them would be irreversible under collab/undo, where the ref
dangling and later RE-RESOLVING is exactly what makes undo-of-parent-delete restore
children byte-identically (same argument as the link quarantine in collab/integrity.ts). The price of keeping the ref is that the position readers must TOLERATE it: without
help, a relative child whose parent stopped resolving read its raw offset as world
coordinates and visually JUMPED. This anchor is the help — everything the three parent
frame readers (getWorldPosition / getGlobalPosition / getGlobalTransformMatrix) need to
freeze an orphaned subtree exactly where the user last saw it. Captured by
DiagramModel.removeNode() at the moment of removal; DERIVED, session-local, never
serialized (a document loaded with a dangle has no anchor to freeze at — that is
DiagramValidator's case, and the readers keep their deterministic raw-offset fallback).
tsinterface DetachedParentAnchor
Properties
| Name | Type | Default | Description |
|---|---|---|---|
world | Point | getWorldPosition() at removal — the summed offset chain, world coords. | |
global | Point | getGlobalPosition() at removal — the transform-aware position. | |
rotation | number | Local rotation at removal (getGlobalPosition composes against the parent's LOCAL rotation). | |
scale | Point | Local scale at removal (same reason). | |
matrix | TransformMatrix | getGlobalTransformMatrix() at removal — for getGlobalBounds and friends. |
Was this page helpful?