changeset 3206:dffcf1cc8a8b

client: identify: set type in fairway availability dialog when necessary
author Markus Kottlaender <markus@intevation.de>
date Wed, 08 May 2019 17:29:50 +0200
parents bf571429515f
children ba7bc3740fb3
files client/src/components/map/MapPopup.vue client/src/store/map.js
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/MapPopup.vue	Wed May 08 17:15:08 2019 +0200
+++ b/client/src/components/map/MapPopup.vue	Wed May 08 17:29:50 2019 +0200
@@ -203,6 +203,7 @@
       this.close();
     },
     openFairwayAvailabilityForBottleneck(bottleneck) {
+      this.$store.commit("diagram/type", "bottlenecks");
       this.$store.dispatch(
         "bottlenecks/setSelectedBottleneck",
         bottleneck.get("objnam")
@@ -221,6 +222,7 @@
       this.openFairwayAvailability();
     },
     openFairwayAvailabilityForStretch(stretch) {
+      this.$store.commit("diagram/type", "stretches");
       this.$store.commit("imports/selectedStretchId", stretch.getId());
       this.$store.dispatch("map/moveToFeauture", {
         feature: stretch,
--- a/client/src/store/map.js	Wed May 08 17:15:08 2019 +0200
+++ b/client/src/store/map.js	Wed May 08 17:29:50 2019 +0200
@@ -369,12 +369,12 @@
             !gauges.length
           ) {
             if (rootState.imports.selectedStretchId === stretches[0].getId()) {
-              commit("application/showStatistics", false, { root: true });
               commit("imports/selectedStretchId", null, {
                 root: true
               });
             } else {
               commit("application/showStatistics", true, { root: true });
+              commit("diagram/type", "stretches", { root: true });
               commit("imports/selectedStretchId", stretches[0].getId(), {
                 root: true
               });