Skip to content

feat(core): OrthographicView: soft-deprecate array zoom#10106

Merged
Pessimistress merged 3 commits intomasterfrom
x/ortho-controller
Mar 17, 2026
Merged

feat(core): OrthographicView: soft-deprecate array zoom#10106
Pessimistress merged 3 commits intomasterfrom
x/ortho-controller

Conversation

@Pessimistress
Copy link
Collaborator

@Pessimistress Pessimistress commented Mar 17, 2026

zoom: number | [number, number] in OrthographicViewState is inconvenient typing-wise in info vis applications. This PR soft-deprecates zoom: [number, number] and adds the following optional fields to OrthographicViewState:

  • zoomX
  • zoomY
  • minZoomX
  • maxZoomX
  • minZoomY
  • maxZoomY

Minor breaking change in some use cases but it is expected to be uncommon, for example:

new Deck({
  views: new OrthographicView({controller: {zoomAxis: 'X'}}),
  initialViewState: {
    target: [0, 0, 0],
    zoom: [0, 2]
  },
  onViewStateChange: ({viewState}) => {
    // this now has no effect because it is shadowed by viewState.zoomX
    viewState.zoom[0] = 0;
  }
});

Change List

  • Break OrthographicController away from OrbitController due to increasingly diverged types / behaviors
  • New fields in OrthographicViewState type
  • Upgrade guide

@Pessimistress Pessimistress changed the title feat(core): Soft-deprecate array zoom feat(core): OrthographicView: soft-deprecate array zoom Mar 17, 2026
@Pessimistress Pessimistress requested a review from ibgreen March 17, 2026 02:42
@coveralls
Copy link

Coverage Status

coverage: 91.057% (+0.05%) from 91.008%
when pulling 8f145dc on x/ortho-controller
into be97de1 on master.

@chrisgervang
Copy link
Collaborator

I agree, zoomX and zoomY will be better for infovis.

@Pessimistress Pessimistress merged commit 0a3d347 into master Mar 17, 2026
5 checks passed
@Pessimistress Pessimistress deleted the x/ortho-controller branch March 17, 2026 03:28
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