Mercurial > gemma
diff client/src/components/layers/Layers.vue @ 3177:fc008b32c593
client: layers: loading animation for refreshing layer sources
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 07 May 2019 12:18:07 +0200 |
parents | 85734c763652 |
children | c122a064fd5e |
line wrap: on
line diff
--- a/client/src/components/layers/Layers.vue Mon May 06 18:18:17 2019 +0200 +++ b/client/src/components/layers/Layers.vue Tue May 07 12:18:07 2019 +0200 @@ -10,7 +10,9 @@ icon="layer-group" :title="label" :closeCallback="close" - :actions="[{ callback: refreshLayers, icon: 'sync' }]" + :actions="[ + { callback: refreshLayers, icon: mapsLoading ? 'spinner' : 'sync' } + ]" /> <div class="small" v-if="openLayersMaps.length"> <Layerselect layerId="OPENSTREETMAP" /> @@ -59,7 +61,7 @@ }, computed: { ...mapState("application", ["showLayers"]), - ...mapState("map", ["openLayersMaps"]), + ...mapState("map", ["openLayersMaps", "mapsLoading"]), label() { return this.$gettext("Layers"); } @@ -70,6 +72,7 @@ }, refreshLayers() { this.openLayersMaps.forEach(map => { + this.$store.commit("map/increaseMapsLoading"); let layers = map.getLayers().getArray(); for (let i = 0; i < layers.length; i++) { let layer = layers[i];