diff 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
line wrap: on
line diff
--- a/client/src/application/Morphtool.vue	Tue Oct 09 13:30:45 2018 +0200
+++ b/client/src/application/Morphtool.vue	Tue Oct 09 17:00:49 2018 +0200
@@ -98,7 +98,8 @@
       if (this.identifiedFeatures && !this.drawMode) {
         for (let feature of this.identifiedFeatures) {
           let id = feature.getId();
-          if (id && id.replace(/[.][^.]*$/, "") === "bottlenecks") {
+          // RegExp.prototype.test() works with number, str and undefined
+          if (/^bottlenecks\./.test(id)) {
             this.$store.commit("mapstore/setSelectedMorph", null);
             return feature;
           }