Mercurial > gemma
diff client/src/components/importoverview/StretchDetails.vue @ 2957:b74ebeb2bdc8
client: layers: improved structure of layer configuration
The object is now less cluttered, access to the layers is more direct, no need for helper methods
anymore.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 08 Apr 2019 15:32:53 +0200 |
parents | 80815b0a665c |
children | 1b8bb4f89227 |
line wrap: on
line diff
--- a/client/src/components/importoverview/StretchDetails.vue Mon Apr 08 14:53:09 2019 +0200 +++ b/client/src/components/importoverview/StretchDetails.vue Mon Apr 08 15:32:53 2019 +0200 @@ -21,7 +21,6 @@ * Thomas Junk <thomas.junk@intevation.de> */ import { displayError } from "@/lib/errors.js"; -import { LAYERS } from "@/store/map.js"; import { mapState } from "vuex"; export default { @@ -31,7 +30,8 @@ this.$store.commit("imports/hideAdditionalInfo"); }, computed: { - ...mapState("imports", ["showAdditional", "details"]) + ...mapState("imports", ["showAdditional", "details"]), + ...mapState("map", ["layers"]) }, methods: { moveToExtent(feature) { @@ -43,7 +43,7 @@ }, zoomToStretch() { const name = this.details.summary.stretch; - this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES); + this.layers.STRETCHES.setVisible(true); this.$store .dispatch("imports/loadStretch", name) .then(response => {