changeset 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
files client/src/components/TimeSlider.vue
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/TimeSlider.vue	Wed Mar 18 17:35:35 2020 +0100
+++ b/client/src/components/TimeSlider.vue	Thu Mar 19 07:23:35 2020 +0100
@@ -179,11 +179,20 @@
       }
     },
     sourcesLoading() {
+      const layers = [
+        "BOTTLENECKS",
+        "GAUGES",
+        "FAIRWAYDIMENSIONSLOS1",
+        "FAIRWAYDIMENSIONSLOS2",
+        "FAIRWAYDIMENSIONSLOS3",
+        "WATERWAYAXIS",
+        "FAIRWAYMARKS"
+      ];
       let counter = 0;
       this.openLayersMaps.forEach(map => {
-        let layers = map.getLayers().getArray();
         for (let i = 0; i < layers.length; i++) {
-          if (layers[i].getSource().loading) counter++;
+          let layer = map.getLayer(layers[i]);
+          if (layer.getSource().loading) counter++;
         }
       });
       return counter;