comparison client/src/store/map.js @ 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 47453337c698
children c122a064fd5e
comparison
equal deleted inserted replaced
3176:1cb6676d1510 3177:fc008b32c593
30 const init = () => { 30 const init = () => {
31 return { 31 return {
32 openLayersMaps: [], 32 openLayersMaps: [],
33 syncedMaps: [], 33 syncedMaps: [],
34 syncedView: null, 34 syncedView: null,
35 mapsLoading: 0,
35 initialLoad: true, 36 initialLoad: true,
36 extent: { 37 extent: {
37 lat: 6155376, 38 lat: 6155376,
38 lon: 1819178, 39 lon: 1819178,
39 zoom: 11 40 zoom: 11
61 filteredIdentifiedFeatures: state => { 62 filteredIdentifiedFeatures: state => {
62 return state.identifiedFeatures.filter(f => f.getId()); 63 return state.identifiedFeatures.filter(f => f.getId());
63 } 64 }
64 }, 65 },
65 mutations: { 66 mutations: {
67 increaseMapsLoading: state => {
68 state.mapsLoading++;
69 },
70 decreaseMapsLoading: state => {
71 state.mapsLoading--;
72 if (state.mapsLoading < 0) state.mapsLoading = 0;
73 },
66 initialLoad: (state, initialLoad) => { 74 initialLoad: (state, initialLoad) => {
67 state.initialLoad = initialLoad; 75 state.initialLoad = initialLoad;
68 }, 76 },
69 extent: (state, extent) => { 77 extent: (state, extent) => {
70 state.extent = extent; 78 state.extent = extent;