Skip to content

Commit

Permalink
fix: set silverFirArea and altitudinalZone depending on projection mo…
Browse files Browse the repository at this point in the history
…de and form location
  • Loading branch information
friedjoff committed Sep 1, 2020
1 parent faae773 commit 9440daa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/store/enhancers/projection.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ const projection = (store) => (next) => (action) => {
? { ...formLocation, ...mapLocation }
: { ...mapLocation, ...formLocation };
if (hochmontanAltitudinalZones.includes(location.altitudinalZone)) {
location.silverFirArea = location.altitudinalZone.slice(1);
location.altitudinalZone = '80';
if (projectionMode === 'm' || !formLocation.silverFirArea) {
location.silverFirArea = location.altitudinalZone.slice(1);
}
if (projectionMode === 'm' || !formLocation.altitudinalZone) {
location.altitudinalZone = '80';
}
}
if (!location.transition) {
delete location.transitionForestType;
Expand Down

0 comments on commit 9440daa

Please sign in to comment.