diff client/src/morphtool/Morphtool.vue @ 1027:04a9e78dcc5f

refac: remove morphstore. not necessary
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 24 Oct 2018 14:17:51 +0200
parents ca628dce90dd
children 5a43d5602d14 7ec2133c6404
line wrap: on
line diff
--- a/client/src/morphtool/Morphtool.vue	Wed Oct 24 13:35:15 2018 +0200
+++ b/client/src/morphtool/Morphtool.vue	Wed Oct 24 14:17:51 2018 +0200
@@ -5,13 +5,21 @@
                 <div class="headline">
                     <h4>{{bottleneckName}}</h4>
                     <hr>
-                    <div @click="clearSelection" class="float-left ui-element d-flex morphtoolminus">
+                    <div
+                        @click="clearSelection"
+                        class="float-left ui-element d-flex morphtoolminus"
+                    >
                         <i class="fa fa-close morphtoolsminus"></i>
                     </div>
                 </div>
                 <ul class="list-group surveylist">
-                    <li v-for="survey of surveyList.surveys" :key="survey.data_info" class="list-group-item" @click.prevent="selectSurvey(survey)">
-                        <a href="#" @click.prevent="">{{survey.date_info}}</a>
+                    <li
+                        v-for="survey of surveyList.surveys"
+                        :key="survey.data_info"
+                        class="list-group-item"
+                        @click.prevent="selectSurvey(survey)"
+                    >
+                        <a href="#" @click.prevent>{{survey.date_info}}</a>
                     </li>
                 </ul>
             </div>
@@ -20,7 +28,10 @@
             <div class="d-flex flex-row justify-content-between">
                 <i class="fa fa-close text-danger"></i>
                 <small>Bottleneck:&nbsp;</small>
-                <h6>{{bottleneckName}} <small>( {{selectedMorph.date_info}} )</small></h6>
+                <h6>
+                    {{bottleneckName}}
+                    <small>( {{selectedMorph.date_info}} )</small>
+                </h6>
             </div>
         </div>
     </div>
@@ -111,14 +122,14 @@
   computed: {
     ...mapGetters("application", ["drawMode"]),
     ...mapState("identifystore", ["identifiedFeatures"]),
-    ...mapState("morphstore", ["selectedMorph"]),
+    ...mapState("fairwayprofile", ["selectedMorph"]),
     selectedBottleneck: function() {
       if (this.identifiedFeatures && !this.drawMode) {
         for (let feature of this.identifiedFeatures) {
           let id = feature.getId();
           // RegExp.prototype.test() works with number, str and undefined
           if (/^bottlenecks\./.test(id)) {
-            this.$store.commit("morphstore/setSelectedMorph", null);
+            this.$store.commit("fairwayprofile/setSelectedMorph", null);
             return feature;
           }
         }
@@ -163,12 +174,12 @@
         });
     },
     selectSurvey(survey) {
-      this.$store.commit("morphstore/setSelectedMorph", survey);
+      this.$store.commit("fairwayprofile/setSelectedMorph", survey);
       this.surveyList = null;
     },
     clearSelection() {
       this.$store.commit("identifystore/setIdentifiedFeatures", []);
-      this.$store.commit("morphstore/setSelectedMorph", null);
+      this.$store.commit("fairwayprofile/setSelectedMorph", null);
       this.surveyList = null;
       if (this.drawMode) {
         this.$store.commit("application/toggleDrawModeLine");