comparison 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
comparison
equal deleted inserted replaced
4373:aa249a25f0ec 4374:ad2bf9580696
57 * 57 *
58 * Author(s): 58 * Author(s):
59 * Thomas Junk <thomas.junk@intevation.de> 59 * Thomas Junk <thomas.junk@intevation.de>
60 * Markus Kottländer <markus.kottlaender@intevation.de> 60 * Markus Kottländer <markus.kottlaender@intevation.de>
61 */ 61 */
62 import { mapState } from "vuex"; 62 import { mapState, mapGetters } from "vuex";
63 63
64 export default { 64 export default {
65 components: { 65 components: {
66 Layerselect: () => import("./Layerselect") 66 Layerselect: () => import("./Layerselect")
67 }, 67 },
68 computed: { 68 computed: {
69 ...mapState("application", ["showLayers"]), 69 ...mapState("application", ["showLayers"]),
70 ...mapState("map", ["openLayersMaps", "reviewActive"]), 70 ...mapState("map", ["openLayersMaps", "reviewActive"]),
71 ...mapGetters("map", ["openLayersMap"]),
71 label() { 72 label() {
72 return this.$gettext("Map Layers"); 73 return this.$gettext("Map Layers");
73 }, 74 },
74 sourcesLoading() { 75 sourcesLoading() {
75 let counter = 0; 76 let counter = 0;
78 for (let i = 0; i < layers.length; i++) { 79 for (let i = 0; i < layers.length; i++) {
79 if (layers[i].getSource().loading) counter++; 80 if (layers[i].getSource().loading) counter++;
80 } 81 }
81 }); 82 });
82 return counter; 83 return counter;
84 }
85 },
86 watch: {
87 reviewActive() {
88 if (!this.reviewActive) {
89 const fairwaydimensionLayer = this.openLayersMap().getLayer(
90 "FDREVIEWLAYER"
91 );
92 fairwaydimensionLayer.setVisible(false);
93 }
83 } 94 }
84 }, 95 },
85 methods: { 96 methods: {
86 close() { 97 close() {
87 this.$store.commit("application/showLayers", false); 98 this.$store.commit("application/showLayers", false);