changeset 1238:442399fc1b71

linted code
author Markus Kottlaender <markus@intevation.de>
date Tue, 20 Nov 2018 13:05:50 +0100
parents 74562dc29e10
children d842d9d10872
files client/src/drawtool/Drawtool.vue client/src/map/Maplayer.vue
diffstat 2 files changed, 18 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/drawtool/Drawtool.vue	Tue Nov 20 13:03:24 2018 +0100
+++ b/client/src/drawtool/Drawtool.vue	Tue Nov 20 13:05:50 2018 +0100
@@ -46,12 +46,7 @@
   name: "drawtool",
   computed: {
     ...mapGetters("map", ["getLayerByName"]),
-    ...mapState("map", [
-      "lineTool",
-      "polygonTool",
-      "cutTool",
-      "openLayersMap"
-    ]),
+    ...mapState("map", ["lineTool", "polygonTool", "cutTool", "openLayersMap"]),
     ...mapState("bottlenecks", ["selectedSurvey"])
   },
   methods: {
@@ -60,14 +55,18 @@
       this.polygonTool.setActive(false);
       this.cutTool.setActive(false);
       this.$store.commit("map/setCurrentMeasurement", null);
-      this.getLayerByName("Draw Tool").data.getSource().clear();
+      this.getLayerByName("Draw Tool")
+        .data.getSource()
+        .clear();
     },
     togglePolygonTool() {
       this.polygonTool.setActive(!this.polygonTool.getActive());
       this.lineTool.setActive(false);
       this.cutTool.setActive(false);
       this.$store.commit("map/setCurrentMeasurement", null);
-      this.getLayerByName("Draw Tool").data.getSource().clear();
+      this.getLayerByName("Draw Tool")
+        .data.getSource()
+        .clear();
     },
     toggleCutTool() {
       this.cutTool.setActive(!this.cutTool.getActive());
@@ -91,8 +90,7 @@
         unitSymbol: areaSize > 100000 ? "km²" : "m²",
         value:
           areaSize > 100000
-            // convert into 1 km² == 1000*1000 m² and round to 1000 m²
-            ? Math.round(areaSize / 1000) / 1000
+            ? Math.round(areaSize / 1000) / 1000 // convert into 1 km² == 1000*1000 m² and round to 1000 m²
             : Math.round(areaSize)
       });
       this.$store.commit("application/showIdentify", true);
@@ -171,7 +169,9 @@
         this.lineTool.setActive(false);
         this.polygonTool.setActive(false);
         this.cutTool.setActive(false);
-        this.getLayerByName("Draw Tool").data.getSource().clear();
+        this.getLayerByName("Draw Tool")
+          .data.getSource()
+          .clear();
       }
     });
   }
--- a/client/src/map/Maplayer.vue	Tue Nov 20 13:03:24 2018 +0100
+++ b/client/src/map/Maplayer.vue	Tue Nov 20 13:05:50 2018 +0100
@@ -58,7 +58,13 @@
   },
   computed: {
     ...mapGetters("map", ["getLayerByName"]),
-    ...mapState("map", ["layers", "openLayersMap", "lineTool", "polygonTool", "cutTool"]),
+    ...mapState("map", [
+      "layers",
+      "openLayersMap",
+      "lineTool",
+      "polygonTool",
+      "cutTool"
+    ]),
     ...mapState("bottlenecks", ["selectedSurvey"]),
     mapStyle() {
       return {