changeset 903:2990a878b16b

fix cut with scissors
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 02 Oct 2018 16:43:24 +0200
parents 396b0e35c8eb
children 84d1051c5e99 dd81ebefc50d
files client/src/application/Linetool.vue
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/application/Linetool.vue	Tue Oct 02 16:26:07 2018 +0200
+++ b/client/src/application/Linetool.vue	Tue Oct 02 16:43:24 2018 +0200
@@ -20,13 +20,13 @@
   z-index: 2;
 }
 
-.fa-pencil-inverted {
+.inverted {
   color: #0077ff;
 }
 </style>
 
 <script>
-import { mapGetters } from "vuex";
+import { mapGetters, mapState } from "vuex";
 
 export default {
   name: "linetool",
@@ -37,11 +37,14 @@
   },
   computed: {
     ...mapGetters("application", ["drawMode"]),
+    ...mapState("mapstore", ["identifiedFeatures", "selectedMorph"]),
     icon() {
       return {
         fa: true,
-        "fa-pencil": true,
-        "fa-pencil-inverted": this.drawMode
+        "fa-pencil": !this.selectedMorph,
+        "fa-pencil inverted": !this.selectedMorph && this.drawMode,
+        "fa-cut": this.selectedMorph,
+        "fa-cut inverted": this.selectedMorph && this.drawMode
       };
     }
   }