diff client/src/components/map/Map.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 286c2e3cc105
children c122a064fd5e
line wrap: on
line diff
--- a/client/src/components/map/Map.vue	Mon May 06 18:18:17 2019 +0200
+++ b/client/src/components/map/Map.vue	Tue May 07 12:18:07 2019 +0200
@@ -15,6 +15,7 @@
   background-image: linear-gradient(45deg, #e8e8e8 25%, transparent 25%, transparent 75%, #e8e8e8 75%, #e8e8e8), linear-gradient(45deg, #e8e8e8 25%, transparent 25%, transparent 75%, #e8e8e8 75%, #e8e8e8)
   background-size: 20px 20px
   background-position: 0 0, 10px 10px
+
   &.nocursor
     cursor: none
 </style>
@@ -175,6 +176,10 @@
       });
       this.map.getLayer = id => this.layers.get(id);
 
+      this.map.on("rendercomplete", () => {
+        this.$store.commit("map/decreaseMapsLoading");
+      });
+
       // store map position on every move
       // will be obsolete once we abandoned the separated admin context
       this.map.on("moveend", event => {