changeset 594:6987b5c926b8

fix: leveraging vue.nexttick instead of timeout
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 07 Sep 2018 13:55:02 +0200
parents c4a4dc612191
children 6c3527ddc200
files client/src/map/Maplayer.vue
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue	Fri Sep 07 13:45:49 2018 +0200
+++ b/client/src/map/Maplayer.vue	Fri Sep 07 13:55:02 2018 +0200
@@ -58,9 +58,9 @@
   watch: {
     split() {
       const map = this.openLayersMap;
-      setTimeout(function() {
+      this.$nextTick(() => {
         map.updateSize();
-      }, 1);
+      });
     }
   },
   mounted() {