Skip to content

Commit

Permalink
CADENZA-37531 Fix geometry zooming behaviour to equal the behaviour i… (
Browse files Browse the repository at this point in the history
#73)

* CADENZA-37531 Fix geometry zooming behaviour to equal the behaviour it was present before the project

* CADENZA-37531 Add the changelog entry for my bugfix

* CADENZA-37531 Add comment for priorization of the extent strategies
  • Loading branch information
klschm authored Nov 25, 2024
1 parent 8901ce4 commit 30d43f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit 30d43f7

Please sign in to comment.