Skip to content

feat(core): override size zoom in OrthographicView - #10532

Merged
Pessimistress merged 2 commits into
masterfrom
x/ortho-unit-size
Aug 6, 2026
Merged

feat(core): override size zoom in OrthographicView#10532
Pessimistress merged 2 commits into
masterfrom
x/ortho-unit-size

Conversation

@Pessimistress

Copy link
Copy Markdown
Collaborator

Background

While OrhographicView supports 2D zoom, project.scale remains a numeric value. This scaler affects the outcome of any sizeUnit: common, including ScatterplotLayer getRadius, TextLayer getSize, PathLayer getWidth etc.

Currently project.scale is calculated as 2 ** Math.min(zoomX, zoomY). This makes geometry sizes unpredictable when only one axis can be zoomed.

This PR allows apps to control the size zoom by supplying their own zoom value. The value is shadowed by zoomX and zoomY during position projection, but respected during size projection. For all other types of viewports, zoom is used for both position and size projections.

Alternative names considered include sizeZoom, and zoomZ.

@coveralls

coveralls commented Aug 6, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 83.757% (+0.005%) from 83.752% — x/ortho-unit-size into master

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Should there be any doc updates?

@Pessimistress
Pessimistress merged commit a02590a into master Aug 6, 2026
5 checks passed
@Pessimistress
Pessimistress deleted the x/ortho-unit-size branch August 6, 2026 19:08
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