Skip to content

fix(widgets): ZoomWidget works with OrthographicView#10202

Merged
Pessimistress merged 4 commits intomasterfrom
x/zoom-widget-fix
Apr 11, 2026
Merged

fix(widgets): ZoomWidget works with OrthographicView#10202
Pessimistress merged 4 commits intomasterfrom
x/zoom-widget-fix

Conversation

@Pessimistress
Copy link
Copy Markdown
Collaborator

@Pessimistress Pessimistress commented Apr 11, 2026

OrthographicView no longer respects zoom when zoomX and zoomY are defined

Change List

  • Detect OrthographicView in ZoomWidget
  • Add zoomAxis prop
  • Documentation
  • Tests

Note

Medium Risk
Changes ZoomWidget zoom behavior and emitted view state for OrthographicView (including new zoomAxis control and updated transition props), which could affect apps relying on prior zoom semantics.

Overview
ZoomWidget now detects OrthographicView and updates zoom using zoomX/zoomY (and zoom: [zoomX, zoomY]) instead of only zoom, with a new zoomAxis prop to zoom X, Y, or both.

The onZoom callback is extended to optionally include zoomX/zoomY, and zoom transitions switch to interpolating zoomX/zoomY when applicable. Docs are updated and new widget test utilities/specs validate normal zooming, min/max constraints, and orthographic axis behavior.

Reviewed by Cursor Bugbot for commit 8f125ea. Bugbot is set up for automated code reviews on this repo. Configure here.

/** Which axes to apply zoom to. One of 'X', 'Y' or 'all'.
* Only effective if the current view is OrthographicView.
*/
zoomAxis?: 'X' | 'Y' | 'all';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd prefer lowercase here. Do we capitalize other string APIs?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmm good point... sadly OrthographicController's zoomAxis (since v8) uses uppercase X and Y

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah dang, ok better to match in this case

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8f125ea. Configure here.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 81.588% (+0.1%) from 81.459% — x/zoom-widget-fix into master

@Pessimistress Pessimistress merged commit e519077 into master Apr 11, 2026
5 checks passed
@Pessimistress Pessimistress deleted the x/zoom-widget-fix branch April 11, 2026 15:31
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.

3 participants