Mercurial > gemma
comparison client/src/map/Maplayer.vue @ 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 | ef00684e021f |
comparison
equal
deleted
inserted
replaced
593:c4a4dc612191 | 594:6987b5c926b8 |
---|---|
56 }, | 56 }, |
57 methods: {}, | 57 methods: {}, |
58 watch: { | 58 watch: { |
59 split() { | 59 split() { |
60 const map = this.openLayersMap; | 60 const map = this.openLayersMap; |
61 setTimeout(function() { | 61 this.$nextTick(() => { |
62 map.updateSize(); | 62 map.updateSize(); |
63 }, 1); | 63 }); |
64 } | 64 } |
65 }, | 65 }, |
66 mounted() { | 66 mounted() { |
67 var that = this; | 67 var that = this; |
68 this.openLayersMap = new Map({ | 68 this.openLayersMap = new Map({ |