comparison client/src/components/Statistics.vue @ 3184:1ba2a7d22fbb

available_fairway_depth: display selected feature
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 07 May 2019 16:59:11 +0200
parents f64cc98746a1
children 505414dfe3e7
comparison
equal deleted inserted replaced
3183:f64cc98746a1 3184:1ba2a7d22fbb
118 }, 118 },
119 setSelectedBottleneck() { 119 setSelectedBottleneck() {
120 const bn = this.bottlenecksList.filter( 120 const bn = this.bottlenecksList.filter(
121 x => x.properties.name === this.selectedBottleneck 121 x => x.properties.name === this.selectedBottleneck
122 )[0]; 122 )[0];
123 this.$store.commit("fairwayprofile/setSelectedFairwayAvailability", bn); 123 this.$store.commit("diagram/setSelectedFairwayAvailability", bn);
124 } 124 }
125 }, 125 },
126 computed: { 126 computed: {
127 ...mapState("application", ["showStatistics", "paneSetup", "showProfiles"]), 127 ...mapState("application", ["showStatistics", "paneSetup", "showProfiles"]),
128 ...mapState("fairwayprofile", ["selectedFairwayAvailabilityFeature"]), 128 ...mapState("diagram", ["selectedFairwayAvailabilityFeature"]),
129 ...mapState("imports", ["stretches"]), 129 ...mapState("imports", ["stretches"]),
130 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]), 130 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]),
131 ...mapGetters("map", ["openLayersMap"]), 131 ...mapGetters("map", ["openLayersMap"]),
132 selectedEntry: { 132 selectedEntry: {
133 get() { 133 get() {
134 return this.selectedFairwayAvailabilityFeature; 134 return this.selectedFairwayAvailabilityFeature;
135 }, 135 },
136 set(feature) { 136 set(feature) {
137 this.$store.commit( 137 this.$store.commit("diagram/setSelectedFairwayAvailability", feature);
138 "fairwayprofile/setSelectedFairwayAvailability",
139 feature
140 );
141 } 138 }
142 }, 139 },
143 entries() { 140 entries() {
144 if (this.type === this.$options.BOTTLENECKS) return this.bottlenecksList; 141 if (this.type === this.$options.BOTTLENECKS) return this.bottlenecksList;
145 if (this.type === this.$options.STRETCHES) return this.stretches; 142 if (this.type === this.$options.STRETCHES) return this.stretches;
163 }, 160 },
164 type() { 161 type() {
165 if (this.type === this.$options.BOTTLENECKS && this.selectedBottleneck) { 162 if (this.type === this.$options.BOTTLENECKS && this.selectedBottleneck) {
166 this.setSelectedBottleneck(); 163 this.setSelectedBottleneck();
167 } else { 164 } else {
168 this.$store.commit( 165 this.$store.commit("diagram/setSelectedFairwayAvailability", null);
169 "fairwayprofile/setSelectedFairwayAvailability",
170 null
171 );
172 } 166 }
173 this.openLayersMap() 167 this.openLayersMap()
174 .getLayer("STRETCHES") 168 .getLayer("STRETCHES")
175 .setVisible(true); 169 .setVisible(true);
176 }, 170 },