# HG changeset patch # User Markus Kottlaender # Date 1542031924 -3600 # Node ID 5f98d0c9d738c52a9d3e78180e102047ca4067e9 # Parent 846e336d8ee57c15198b432b44e6bfe210dcdad9 linted code diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/application/Main.vue --- a/client/src/application/Main.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/application/Main.vue Mon Nov 12 15:12:04 2018 +0100 @@ -40,7 +40,7 @@ import Maplayer from "../map/Maplayer"; import FairwayProfile from "../fairway/Fairwayprofile"; -import { mapGetters, mapState } from "vuex"; +import { mapState } from "vuex"; import debounce from "debounce"; export default { diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/application/Userbar.vue --- a/client/src/application/Userbar.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/application/Userbar.vue Mon Nov 12 15:12:04 2018 +0100 @@ -59,7 +59,7 @@ * Author(s): * Thomas Junk */ -import { mapGetters, mapState } from "vuex"; +import { mapState } from "vuex"; export default { name: "user", data() { diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/bottlenecks/Bottlenecks.vue --- a/client/src/bottlenecks/Bottlenecks.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/bottlenecks/Bottlenecks.vue Mon Nov 12 15:12:04 2018 +0100 @@ -65,7 +65,7 @@ * Author(s): * Markus Kottländer */ -import { mapState, mapGetters } from "vuex"; +import { mapState } from "vuex"; import { fromLonLat } from "ol/proj"; import { HTTP } from "../application/lib/http"; import { displayError } from "../application/lib/errors.js"; diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/drawtool/Drawtool.vue --- a/client/src/drawtool/Drawtool.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/drawtool/Drawtool.vue Mon Nov 12 15:12:04 2018 +0100 @@ -56,28 +56,40 @@ name: "drawtool", computed: { ...mapGetters("map", ["getLayerByName"]), - ...mapState("map", ["drawMode", "drawTool", "cutMode", "cutTool", "openLayersMap"]), + ...mapState("map", [ + "drawMode", + "drawTool", + "cutMode", + "cutTool", + "openLayersMap" + ]), ...mapState("bottlenecks", ["selectedSurvey"]) }, methods: { toggleLineMode() { this.disableDrawTool(); this.disableCutTool(); - this.$store.commit("map/drawMode", this.drawMode !== "LineString" ? "LineString" : null); + this.$store.commit( + "map/drawMode", + this.drawMode !== "LineString" ? "LineString" : null + ); this.$store.commit("map/cutMode", null); if (this.drawMode) this.enableDrawTool(); }, togglePolygonMode() { this.disableDrawTool(); this.disableCutTool(); - this.$store.commit("map/drawMode", this.drawMode !== "Polygon" ? "Polygon" : null); + this.$store.commit( + "map/drawMode", + this.drawMode !== "Polygon" ? "Polygon" : null + ); this.$store.commit("map/cutMode", null); if (this.drawMode) this.enableDrawTool(); }, toggleCutMode() { this.disableCutTool(); this.disableDrawTool(); - this.$store.commit('map/cutMode', !this.cutMode); + this.$store.commit("map/cutMode", !this.cutMode); this.$store.commit("map/drawMode", null); if (this.cutMode) this.enableCutTool(); }, @@ -102,7 +114,9 @@ }, disableDrawTool() { this.$store.commit("map/setCurrentMeasurement", null); - this.getLayerByName("Draw Tool").data.getSource().clear(); + this.getLayerByName("Draw Tool") + .data.getSource() + .clear(); this.openLayersMap.removeInteraction(this.drawTool); this.$store.commit("map/drawTool", null); }, @@ -114,9 +128,10 @@ this.$store.commit("map/setCurrentMeasurement", { quantity: "Area", unitSymbol: areaSize > 100000 ? "km²" : "m²", - value: areaSize > 100000 - ? Math.round(areaSize / 1000) / 1000 // convert into 1 km² == 1000*1000 m² and round to 1000 m² - : Math.round(areaSize) + value: + areaSize > 100000 + ? Math.round(areaSize / 1000) / 1000 // convert into 1 km² == 1000*1000 m² and round to 1000 m² + : Math.round(areaSize) }); } if (this.drawMode === "LineString") { @@ -148,7 +163,9 @@ }, disableCutTool() { this.$store.commit("map/setCurrentMeasurement", null); - this.getLayerByName("Cut Tool").data.getSource().clear(); + this.getLayerByName("Cut Tool") + .data.getSource() + .clear(); this.openLayersMap.removeInteraction(this.cutTool); this.$store.commit("map/cutTool", null); }, @@ -220,7 +237,7 @@ transformedLine, featureCallback ); - }, + } } }; diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/imports/Imports.vue --- a/client/src/imports/Imports.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/imports/Imports.vue Mon Nov 12 15:12:04 2018 +0100 @@ -43,4 +43,3 @@ margin-right: auto; } - diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/imports/Job.vue --- a/client/src/imports/Job.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/imports/Job.vue Mon Nov 12 15:12:04 2018 +0100 @@ -33,4 +33,3 @@ text-align: left; } - diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/map/Maplayer.vue --- a/client/src/map/Maplayer.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/map/Maplayer.vue Mon Nov 12 15:12:04 2018 +0100 @@ -74,13 +74,16 @@ var features = this.openLayersMap.getFeaturesAtPixel(pixel); if (features) { this.$store.commit("map/setIdentifiedFeatures", features); - + // get selected bottleneck from identified features for (let feature of features) { let id = feature.getId(); // RegExp.prototype.test() works with number, str and undefined if (/^bottlenecks\./.test(id)) { - this.$store.dispatch("bottlenecks/setSelectedBottleneck", feature.get("objnam")); + this.$store.dispatch( + "bottlenecks/setSelectedBottleneck", + feature.get("objnam") + ); } } } diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/morphtool/Morphtool.vue --- a/client/src/morphtool/Morphtool.vue Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/morphtool/Morphtool.vue Mon Nov 12 15:12:04 2018 +0100 @@ -122,8 +122,10 @@ this.$store.dispatch("bottlenecks/setSelectedBottleneck", null); this.$store.commit("application/showSplitscreen", false); this.$store.commit("map/cutMode", false); - this.getLayerByName("Cut Tool").data.getSource().clear(); - this.openLayersMap.removeInteraction(this.cutTool) + this.getLayerByName("Cut Tool") + .data.getSource() + .clear(); + this.openLayersMap.removeInteraction(this.cutTool); } } }; diff -r 846e336d8ee5 -r 5f98d0c9d738 client/src/store/map.js --- a/client/src/store/map.js Mon Nov 12 15:00:45 2018 +0100 +++ b/client/src/store/map.js Mon Nov 12 15:12:04 2018 +0100 @@ -366,6 +366,6 @@ }, cutTool: (state, cutTool) => { state.cutTool = cutTool; - }, + } } };