Skip to content

fix: align k-space zoom and pan with camera axes - #20

Open
5o1 wants to merge 1 commit into
bughht:mainfrom
5o1:fix/kspace-zoom-pan-camera-axes
Open

fix: align k-space zoom and pan with camera axes#20
5o1 wants to merge 1 commit into
bughht:mainfrom
5o1:fix/kspace-zoom-pan-camera-axes

Conversation

@5o1

@5o1 5o1 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fix cursor-anchored k-space wheel zoom drifting on high-DPI and non-XY views
  • align middle/right-button mouse pan and touch pan with the current camera axes
  • sync animation targets when drag or touch interactions interrupt an in-flight camera transition

Changes

  • add shared helpers for wheel zoom scaling, scale clamping, and camera-plane to world-space conversion
  • make wheel zoom update the view center from the target camera state
  • replace the old pan-specific coordinate approximation with the shared camera-space transform

Issue: k-space wheel zoom and pan used screen-space approximations that only matched the XY view. On high-DPI displays and in XZ/YZ/3D views, zooming around the cursor and middle/right-button panning could drift or move along the wrong world axes.

Solution: convert cursor offsets and drag deltas through the same camera-plane to world-space transform used by the k-space projection, then update the view center from that shared coordinate model.

Changes: add helpers for wheel zoom scaling, scale clamping, and camera-plane conversion; make wheel zoom preserve the cursor anchor from the target camera state; update mouse and touch pan to use the shared transform; sync animation targets when drag interactions interrupt an in-flight camera transition.
Copilot AI review requested due to automatic review settings July 17, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants