Skip to content

Commit

Permalink
fix(view): Zoom to behavior on feature select/zoomto (#551)
Browse files Browse the repository at this point in the history
* fix(view) prevent zooming out on zoomTo action

* fix(overlay) fix offset between pin and real position

* refactor(view) const instead of let

* refactor(overlay) rollback for icon relative position
  • Loading branch information
pelord authored and mbarbeau committed Jan 24, 2020
1 parent 3fa9ea4 commit 9e9ed1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/geo/src/lib/map/shared/controllers/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ export class MapViewController extends MapController {
const moySize = (toSize + fromSize) / 2;
const xSize = distCenter / moySize;

const maxZoom = action === MapViewAction.Move ? zoom : 17;
console.log(this.padding);
const maxZoom = action === MapViewAction.Move ? zoom : zoom > 19 ? zoom : 19;

olView.fit(extent, {
maxZoom,
padding: this.padding,
Expand Down

0 comments on commit 9e9ed1e

Please sign in to comment.