fix(web/NetworkView): drag fly-away, fetch races, degree dead code#105
Merged
Conversation
- Drag: subject returns screen-space coords so d3-drag's event.x stays in screen units; previously world coords + screen delta were mixed, so a node flew off-screen the instant it was grabbed. - Fetch races: load + style effects now guard their async writes with an 'alive' flag and cleanup, so a slow earlier request can't overwrite newer data. - Dead code: ForceNode gained a 'degree' field and it is now propagated to force nodes, so the dashed outline for non-atom (degree>=1) nodes actually renders (the field was never set before, silently disabling it). - Read network mode via getState() inside effects instead of a stale closure var.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 fixes in the graph view (web-only, no project data).
Fixes
.subject()now returns screen-space coordinates so d3-drag'sevent.xstays in screen units. Previously it returned world coords while d3 adds the screen-pixel pointer delta — the mismatch sent a node flying off-screen the moment it was grabbed.aliveflag + cleanup, so a slow earlier request can no longer overwrite newer data on fast reload/mode-toggle.ForceNodegained adegreefield, now propagated to force nodes — the dashed outline for non-atom (degree≥1) nodes finally renders (the field was never set, silently disabling it).usePluginStore.getState()instead of a closure variable that wasn't in the deps.Typecheck clean; NetworkView tests pass (12/12).