Mercurial > gemma
changeset 3704:271683dee9bf
client: fairway availability diaglog: set correct type when opened from map popup
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Wed, 19 Jun 2019 16:15:42 +0200 |
parents | b07511ff859e |
children | c3b0f2912b6e |
files | client/src/components/map/MapPopup.vue client/src/store/fairwayavailability.js |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/map/MapPopup.vue Wed Jun 19 12:34:48 2019 +0200 +++ b/client/src/components/map/MapPopup.vue Wed Jun 19 16:15:42 2019 +0200 @@ -136,6 +136,7 @@ import { mapState } from "vuex"; import Overlay from "ol/Overlay.js"; import { getCenter } from "ol/extent"; +import { TYPES } from "@/store/fairwayavailability"; export default { computed: { @@ -204,7 +205,7 @@ this.close(); }, openFairwayAvailabilityForBottleneck(bottleneck) { - this.$store.commit("fairwayavailability/type", "bottlenecks"); + this.$store.commit("fairwayavailability/type", TYPES.BOTTLENECK); this.$store.dispatch( "bottlenecks/setSelectedBottleneck", bottleneck.get("objnam") @@ -223,7 +224,7 @@ this.openFairwayAvailability(); }, openFairwayAvailabilityForStretch(stretch) { - this.$store.commit("fairwayavailability/type", "stretches"); + this.$store.commit("fairwayavailability/type", TYPES.STRETCH); this.$store.commit("imports/selectedStretchId", stretch.getId()); this.$store.dispatch("map/moveToFeauture", { feature: stretch, @@ -232,7 +233,7 @@ this.openFairwayAvailability(); }, openFairwayAvailabilityForSection(section) { - this.$store.commit("fairwayavailability/type", "sections"); + this.$store.commit("fairwayavailability/type", TYPES.SECTION); this.$store.commit("imports/selectedSectionId", section.getId()); this.$store.dispatch("map/moveToFeauture", { feature: section,
--- a/client/src/store/fairwayavailability.js Wed Jun 19 12:34:48 2019 +0200 +++ b/client/src/store/fairwayavailability.js Wed Jun 19 16:15:42 2019 +0200 @@ -331,4 +331,4 @@ } }; -export { LIMITINGFACTORS, FREQUENCIES, fairwayavailability }; +export { LIMITINGFACTORS, FREQUENCIES, TYPES, fairwayavailability };