# HG changeset patch # User Markus Kottlaender # Date 1557328508 -7200 # Node ID bf571429515f456807c09473cf58d21bc01bd413 # Parent 1253fe15e3e30f574335e087037b4177d83aabc6 client: fairway availability: moved component's type property to store to manipulate it from outside diff -r 1253fe15e3e3 -r bf571429515f client/src/components/Statistics.vue --- 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; diff -r 1253fe15e3e3 -r bf571429515f client/src/store/diagram.js --- a/client/src/store/diagram.js Wed May 08 17:10:17 2019 +0200 +++ b/client/src/store/diagram.js Wed May 08 17:15:08 2019 +0200 @@ -16,6 +16,7 @@ const init = () => { return { + type: "bottlenecks", selectedFairwayAvailabilityFeature: null, from: null, to: null, @@ -31,6 +32,9 @@ namespaced: true, state: init(), mutations: { + type: (state, type) => { + state.type = type; + }, setLOS: (state, LOS) => { state.LOS = LOS; },