comparison client/src/application/Morphtool.vue @ 941:8a80ef09a62c

client: improve identify * Remove trigger that unfolds the box when features are identified. Rationale: This makes the user interface too "jumpy". * Instead add a style change for the icon to indicate if data is available. It will use the bootstrap `text-info` style class. * Simplify code that detects if a bottleneck was identified.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 09 Oct 2018 17:00:49 +0200
parents f27fe4e9bfd9
children
comparison
equal deleted inserted replaced
940:be7b83638ec8 941:8a80ef09a62c
96 ...mapState("mapstore", ["identifiedFeatures", "selectedMorph"]), 96 ...mapState("mapstore", ["identifiedFeatures", "selectedMorph"]),
97 selectedBottleneck: function() { 97 selectedBottleneck: function() {
98 if (this.identifiedFeatures && !this.drawMode) { 98 if (this.identifiedFeatures && !this.drawMode) {
99 for (let feature of this.identifiedFeatures) { 99 for (let feature of this.identifiedFeatures) {
100 let id = feature.getId(); 100 let id = feature.getId();
101 if (id && id.replace(/[.][^.]*$/, "") === "bottlenecks") { 101 // RegExp.prototype.test() works with number, str and undefined
102 if (/^bottlenecks\./.test(id)) {
102 this.$store.commit("mapstore/setSelectedMorph", null); 103 this.$store.commit("mapstore/setSelectedMorph", null);
103 return feature; 104 return feature;
104 } 105 }
105 } 106 }
106 } 107 }