Graph PR-C: minimap wheel + pinch zoom#64
Merged
Merged
Conversation
The minimap only supported click-to-navigate. Add wheel and pinch zoom so you can zoom from the minimap as well as the main view. - MiniMap.tsx: native (passive:false) wheel + 2-touch pinch listeners on the minimap svg → map the gesture point (minimap px → graph coords via the existing inverse transform) and drive the main view via window.miniMapZoom. Listener attaches when the svg actually appears (the minimap renders a "No nodes yet" div first), via a nodes-present effect dep. - InteractiveGraphVisualization.tsx: window.miniMapZoom(graphX, graphY, targetK) — zoom the main view to targetK (clamped to the [0.1,4] scaleExtent) centered on the graph point, applied through the shared zoom behavior. Verified: tests/diagnostics/minimap-zoom.spec.ts — wheel-in increases and wheel-out decreases the main view scale (0.30 → 0.49 → 0.25). Web typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🧪 Comprehensive Test Suite
Full-stack smoke gate runs in the CI workflow. |
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.
The minimap only supported click-to-navigate. Now you can zoom from the minimap (wheel or pinch), not just the main graph view.
MiniMap.tsx: native (passive:false) wheel + 2-touch pinch listeners on the minimap svg → map the gesture point (minimap px → graph coords via the existing inverse transform) and drive the main view through a newwindow.miniMapZoom. The listener attaches when the svg actually appears (the minimap renders a "No nodes yet" div first).InteractiveGraphVisualization.tsx:window.miniMapZoom(graphX, graphY, targetK)zooms the main view totargetK(clamped to the[0.1,4]scaleExtent), centered on the graph point, via the shared zoom behavior.Verified:
minimap-zoom.spec.ts— wheel-in increases / wheel-out decreases the main view scale (0.30 → 0.49 → 0.25). THE GATE 5/5, typecheck clean.🤖 Generated with Claude Code