Mercurial > gemma
diff client/src/components/layers/Layers.vue @ 4374:ad2bf9580696
importoverview: review of fairwaydimensions improved
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 11 Sep 2019 15:51:15 +0200 |
parents | e9d2573329da |
children | 9842812b92e0 |
line wrap: on
line diff
--- a/client/src/components/layers/Layers.vue Wed Sep 11 12:35:07 2019 +0200 +++ b/client/src/components/layers/Layers.vue Wed Sep 11 15:51:15 2019 +0200 @@ -59,7 +59,7 @@ * Thomas Junk <thomas.junk@intevation.de> * Markus Kottländer <markus.kottlaender@intevation.de> */ -import { mapState } from "vuex"; +import { mapState, mapGetters } from "vuex"; export default { components: { @@ -68,6 +68,7 @@ computed: { ...mapState("application", ["showLayers"]), ...mapState("map", ["openLayersMaps", "reviewActive"]), + ...mapGetters("map", ["openLayersMap"]), label() { return this.$gettext("Map Layers"); }, @@ -82,6 +83,16 @@ return counter; } }, + watch: { + reviewActive() { + if (!this.reviewActive) { + const fairwaydimensionLayer = this.openLayersMap().getLayer( + "FDREVIEWLAYER" + ); + fairwaydimensionLayer.setVisible(false); + } + } + }, methods: { close() { this.$store.commit("application/showLayers", false);