fix(animation): re-run edge geometry after animate() so schema edges don't detach#44
Merged
Merged
Conversation
…don't detach animate()/scramble/reset-grid drive edges via _refreshEdgePaths (a simplified node-centre, no-obstacle path for per-frame speed). Nothing re-ran the reactive edge effect on settle, so schema edges stayed at the node centre with routing lost — worst when final positions equal current (reset-grid on an already-gridded graph: the reactive position write is a no-op). animate() now settles like the history-restore path: bump _layoutAnimTick + _commitNodeGeometry on completion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
On any
animate()(Scramble, reset-grid, layout animations), schema edges detached to the node centre and lost their avoidant routing and stayed that way. Worst on a move whose final positions equal the current ones (reset-grid on an already-gridded graph).Root cause
animate()drives edges each frame through_refreshEdgePaths(canvas-dom.ts) — a simplified imperative path that usesgetHandleCoords(node-side centre) and passes no obstacles, for per-frame speed. On completion nothing re-ran the reactive edge effect (which uses schema handle geometry + obstacle routing), so the simplified node-centre bezier persisted. Pre-existing; unrelated to the routing-quality workstreams (reproduces ondevwith WS-2 absent).Fix
animate()now runs the same settlecanvas-history.tsuses after a restore — bump_layoutAnimTick(re-measure) +_commitNodeGeometry(rebuild the obstacle snapshot) once on completion (rAF). Applied to both the instant and animated completion paths.Verification
_layoutAnimTickbumped,_commitNodeGeometrycalled). Full suite 2869 green.Owner reviews & merges — do not merge or tag.