Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CADENZA-37531 Fix geometry zooming behaviour to equal the behaviour i… #73

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This project uses a version scheme based on the Cadenza main version in the form

## Unreleased

### Fixed
- `geometry` parameter now applies again as `GeometryExtentStrategy`

## 10.2.5 - 2024-11-25
### Added
- 'Additional Layers' to the sandbox of 'Edit Geometry'
Expand Down
5 changes: 4 additions & 1 deletion src/cadenza.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ function array(/** @type unknown */ value) {

/**
* Creates a valid extent strategy based on these rules:
* - `extentStrategy` trumps `mapExtent`, `mapExtent` trumps `locationFinder`.
* - `extentStrategy` trumps `geometry`, `geometry` trumps `mapExtent`, `mapExtent` trumps `locationFinder`.
* - `mapExtent`, `locationFinder`, and `geometry` are used as fallback for
* {@link StaticExtentStrategy#extent}, {@link LocationFinderExtentStrategy#query},
* and {@link GeometryExtentStrategy#geometry} respectively.
Expand Down Expand Up @@ -1473,6 +1473,9 @@ function sanitizeExtentStrategy({
return extentStrategy;
}
}
if (geometry) {
return { type: 'geometry', geometry };
}
if (mapExtent) {
return { type: 'static', extent: mapExtent };
}
Expand Down