changeset 936:f27fe4e9bfd9

client: improve morphology mode * Allow profiles for line segments starting within a bottleneck area, by not updating the selectedBottleneck in the Morphtool component if drawMode is active. Also disable the drawMode if the selected Morphology is cleared.
author Bernhard Reiter <bernhard@intevation.de>
date Mon, 08 Oct 2018 18:09:28 +0200
parents 430d52c2f6ef
children 72430f050d90
files client/src/application/Morphtool.vue
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/application/Morphtool.vue	Mon Oct 08 17:20:42 2018 +0200
+++ b/client/src/application/Morphtool.vue	Mon Oct 08 18:09:28 2018 +0200
@@ -95,7 +95,7 @@
     ...mapGetters("application", ["drawMode"]),
     ...mapState("mapstore", ["identifiedFeatures", "selectedMorph"]),
     selectedBottleneck: function() {
-      if (this.identifiedFeatures) {
+      if (this.identifiedFeatures && !this.drawMode) {
         for (let feature of this.identifiedFeatures) {
           let id = feature.getId();
           if (id && id.replace(/[.][^.]*$/, "") === "bottlenecks") {
@@ -146,6 +146,9 @@
       this.$store.commit("mapstore/setIdentifiedFeatures", []);
       this.$store.commit("mapstore/setSelectedMorph", null);
       this.surveyList = null;
+      if (this.drawMode) {
+        this.$store.commit("application/toggleDrawModeLine");
+      }
     }
   }
 };