Repository navigation
feat: Add mouse right-button + drag box selection for lineage graph - #588
Open
seohyunjun wants to merge 2 commits into
Open
seohyunjun wants to merge 2 commits into
seohyunjun wants to merge 2 commits into
Conversation
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @seohyunjun |
Author
|
I’ve completed and submitted the Individual Contributor License Agreement (CLA). Please let me know if there’s anything else I need to do. Thanks! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open
3 tasks done
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.
resolves #86
Description
Adds right-button drag box selection to the lineage graph (DAG view).
In the current graph,
boxSelectionEnabled: falsemakes a left drag pan the view, so there's no way to select several nodes at once and move them together (#86). This PR keeps panning as it is and gives box selection to the right button instead.drag-motion.mov
How it works
Implementation
src/app/components/graph/graph-box-select.js(new)cxttapstart/cxtdrag/cxttapendevents to draw the box and run hit-testing.divinside the cytoscape container (pointer-events: none), so it doesn't interfere with canvas events.renderedBoundingBox({ includeLabels: false })against the box. Hidden nodes are skipped.cy.batch()so they render only once.src/app/components/graph/graph-viz.js: callsenableRightDragBoxSelect(cy)after the graph is created.src/app/components/graph/graph-viz.css: adds the.graph-box-selectstyle for the box (#bd6bb6dashed border with a translucent fill).src/app/services/graph.service.js: adds anode:selectedstyle (purple border and overlay).selected=1lineage highlight for the clicked node..changes/unreleased/Docs-20261004-220000.yaml: changelog entry.No conflict with the context menu
cytoscape-context-menuslistens tocxttap, which cytoscape fires only for a right click without a drag. A right-drag never opens the menu, and a right-click still does.Tradeoffs / notes
boxSelectionEnabled(shift + left-drag) off. Turning it on would conflict with the existing left-drag panning UX.--select) or the URL state.Checklist
changie newto create a changelog entry🤖 Generated with Claude Code