diff client/src/components/Statistics.vue @ 3205:bf571429515f

client: fairway availability: moved component's type property to store to manipulate it from outside
author Markus Kottlaender <markus@intevation.de>
date Wed, 08 May 2019 17:15:08 +0200
parents 25a26f666ee8
children ba7bc3740fb3
line wrap: on
line diff
--- a/client/src/components/Statistics.vue	Wed May 08 17:10:17 2019 +0200
+++ b/client/src/components/Statistics.vue	Wed May 08 17:15:08 2019 +0200
@@ -142,7 +142,6 @@
 export default {
   data() {
     return {
-      type: this.$options.BOTTLENECKS,
       loading: false
     };
   },
@@ -225,6 +224,14 @@
         this.selectedFairwayAvailabilityFeature == null
       );
     },
+    type: {
+      get() {
+        return this.$store.state.diagram.type;
+      },
+      set(type) {
+        this.$store.commit("diagram/type", type);
+      }
+    },
     los: {
       get() {
         return this.LOS;