Mercurial > gemma
comparison client/src/components/TimeSlider.vue @ 5084:2c3108152497 time-sliding
timeslider: only watch timebased layers
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 19 Mar 2020 07:23:35 +0100 |
parents | 5ec30f63fd58 |
children | fe63733750d7 |
comparison
equal
deleted
inserted
replaced
5083:5ec30f63fd58 | 5084:2c3108152497 |
---|---|
177 } | 177 } |
178 this.$store.commit("application/setSelectedTime", value); | 178 this.$store.commit("application/setSelectedTime", value); |
179 } | 179 } |
180 }, | 180 }, |
181 sourcesLoading() { | 181 sourcesLoading() { |
182 const layers = [ | |
183 "BOTTLENECKS", | |
184 "GAUGES", | |
185 "FAIRWAYDIMENSIONSLOS1", | |
186 "FAIRWAYDIMENSIONSLOS2", | |
187 "FAIRWAYDIMENSIONSLOS3", | |
188 "WATERWAYAXIS", | |
189 "FAIRWAYMARKS" | |
190 ]; | |
182 let counter = 0; | 191 let counter = 0; |
183 this.openLayersMaps.forEach(map => { | 192 this.openLayersMaps.forEach(map => { |
184 let layers = map.getLayers().getArray(); | |
185 for (let i = 0; i < layers.length; i++) { | 193 for (let i = 0; i < layers.length; i++) { |
186 if (layers[i].getSource().loading) counter++; | 194 let layer = map.getLayer(layers[i]); |
195 if (layer.getSource().loading) counter++; | |
187 } | 196 } |
188 }); | 197 }); |
189 return counter; | 198 return counter; |
190 } | 199 } |
191 }, | 200 }, |