Mercurial > gemma
changeset 1113:595654ad3f66 store-refactoring
renamed mapstore to map (like other stores)
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 05 Nov 2018 13:36:44 +0100 |
parents | 2c3d32322126 |
children | 8d12056d602a |
files | client/src/application/Topbar.vue client/src/bottlenecks/Bottlenecks.vue client/src/identify/Identify.vue client/src/layers/Layers.vue client/src/layers/LegendElement.vue client/src/linetool/Linetool.vue client/src/map/Maplayer.vue client/src/store.js client/src/zoom/zoom.vue |
diffstat | 9 files changed, 20 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/application/Topbar.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/application/Topbar.vue Mon Nov 05 13:36:44 2018 +0100 @@ -140,7 +140,7 @@ }; }, computed: { - ...mapState("mapstore", ["openLayersMap"]), + ...mapState("map", ["openLayersMap"]), ...mapState("fairwayprofile", ["currentProfile"]), searchIndicator: function() { if (this.isSearching) {
--- a/client/src/bottlenecks/Bottlenecks.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/bottlenecks/Bottlenecks.vue Mon Nov 05 13:36:44 2018 +0100 @@ -84,7 +84,7 @@ computed: { ...mapState("application", ["bottlenecksCollapsed"]), ...mapState("bottlenecks", ["bottlenecks"]), - ...mapState("mapstore", ["openLayersMap"]), + ...mapState("map", ["openLayersMap"]), ...mapGetters("application", ["sidebarCollapsed"]), bottlenecksStyle() { return {
--- a/client/src/identify/Identify.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/identify/Identify.vue Mon Nov 05 13:36:44 2018 +0100 @@ -109,7 +109,7 @@ }, computed: { ...mapGetters("application", ["versionStr"]), - ...mapState("mapstore", ["identifiedFeatures", "currentMeasurement"]), + ...mapState("map", ["identifiedFeatures", "currentMeasurement"]), identifyStyle() { return { "ui-element": true,
--- a/client/src/layers/Layers.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/layers/Layers.vue Mon Nov 05 13:36:44 2018 +0100 @@ -80,7 +80,7 @@ Layerselect }, computed: { - ...mapGetters("mapstore", ["layers"]), + ...mapGetters("map", ["layers"]), layerSelectStyle() { return { "ui-element": true, @@ -97,7 +97,7 @@ this.collapsed = !this.collapsed; }, visibilityToggled(layer) { - this.$store.commit("mapstore/toggleVisibility", layer); + this.$store.commit("map/toggleVisibility", layer); } } };
--- a/client/src/layers/LegendElement.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/layers/LegendElement.vue Mon Nov 05 13:36:44 2018 +0100 @@ -37,7 +37,7 @@ }; }, computed: { - ...mapGetters("mapstore", ["getLayerByName"]), + ...mapGetters("map", ["getLayerByName"]), id() { return "legendelement" + this.layerindex; },
--- a/client/src/linetool/Linetool.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/linetool/Linetool.vue Mon Nov 05 13:36:44 2018 +0100 @@ -54,7 +54,7 @@ }, computed: { ...mapState("application", ["drawMode"]), - ...mapState("mapstore", ["identifiedFeatures"]), + ...mapState("map", ["identifiedFeatures"]), ...mapState("bottlenecks", ["selectedSurvey"]), icon() { return {
--- a/client/src/map/Maplayer.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/map/Maplayer.vue Mon Nov 05 13:36:44 2018 +0100 @@ -71,9 +71,9 @@ }; }, computed: { - ...mapGetters("mapstore", ["layers", "getLayerByName"]), + ...mapGetters("map", ["layers", "getLayerByName"]), ...mapState("application", ["drawMode"]), - ...mapState("mapstore", ["openLayersMap"]), + ...mapState("map", ["openLayersMap"]), ...mapState("bottlenecks", ["selectedSurvey"]), mapStyle() { return { @@ -124,7 +124,7 @@ return styles; }, removeCurrentInteraction() { - this.$store.commit("mapstore/setCurrentMeasurement", null); + this.$store.commit("map/setCurrentMeasurement", null); this.vectorSource.clear(); this.openLayersMap.removeInteraction(this.interaction); this.interaction = null; @@ -138,7 +138,7 @@ }); draw.on("drawstart", () => { this.vectorSource.clear(); - this.$store.commit("mapstore/setCurrentMeasurement", null); + this.$store.commit("map/setCurrentMeasurement", null); // we are not setting an id here, to avoid the regular identify to // pick it up // event.feature.setId("drawn.1"); // unique id for new feature @@ -152,14 +152,14 @@ // also place the a rounded areaSize in a property, // so identify will show it if (areaSize > 100000) { - this.$store.commit("mapstore/setCurrentMeasurement", { + this.$store.commit("map/setCurrentMeasurement", { quantity: "Area", unitSymbol: "km²", // convert into 1 km² == 1000*1000 m² and round to 1000 m² value: Math.round(areaSize / 1000) / 1000 }); } else { - this.$store.commit("mapstore/setCurrentMeasurement", { + this.$store.commit("map/setCurrentMeasurement", { quantity: "Area", unitSymbol: "m²", value: Math.round(areaSize) @@ -168,7 +168,7 @@ } if (this.drawMode === "LineString") { const length = getLength(event.feature.getGeometry()); - this.$store.commit("mapstore/setCurrentMeasurement", { + this.$store.commit("map/setCurrentMeasurement", { quantity: "Length", unitSymbol: "m", value: Math.round(length * 10) / 10 @@ -242,11 +242,11 @@ this.openLayersMap.addInteraction(interaction); }, identify(coordinate, pixel) { - this.$store.commit("mapstore/setIdentifiedFeatures", []); + this.$store.commit("map/setIdentifiedFeatures", []); // checking our WFS layers var features = this.openLayersMap.getFeaturesAtPixel(pixel); if (features) { - this.$store.commit("mapstore/setIdentifiedFeatures", features); + this.$store.commit("map/setIdentifiedFeatures", features); // get selected bottleneck from identified features for (let feature of features) { @@ -422,7 +422,7 @@ projection: this.projection }) }); - this.$store.commit("mapstore/setOpenLayersMap", map); + this.$store.commit("map/setOpenLayersMap", map); // TODO make display of layers more dynamic, e.g. from a list
--- a/client/src/store.js Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/store.js Mon Nov 05 13:36:44 2018 +0100 @@ -19,7 +19,7 @@ import Application from "./store/application"; import user from "./store/user"; import usermanagement from "./store/usermanagement"; -import mapstore from "./store/map"; +import map from "./store/map"; import FairwayProfile from "./store/fairway"; import Bottlenecks from "./store/bottlenecks"; @@ -30,7 +30,7 @@ application: Application, fairwayprofile: FairwayProfile, bottlenecks: Bottlenecks, - mapstore: mapstore, + map: map, user: user, usermanagement: usermanagement }
--- a/client/src/zoom/zoom.vue Mon Nov 05 13:32:10 2018 +0100 +++ b/client/src/zoom/zoom.vue Mon Nov 05 13:36:44 2018 +0100 @@ -30,7 +30,7 @@ export default { name: "zoom", computed: { - ...mapState("mapstore", ["openLayersMap"]), + ...mapState("map", ["openLayersMap"]), zoomLevel: { get() { return this.openLayersMap.getView().getZoom();