Prevent map error in CMap when switching to another page
This commit is contained in:
parent
e154703af1
commit
17ed47744e
@ -282,13 +282,15 @@ export default {
|
||||
},
|
||||
|
||||
onBoundsUpdate (value) {
|
||||
setTimeout(() => {
|
||||
this.$refs.map.mapObject.invalidateSize()
|
||||
}, 100)
|
||||
|
||||
value = value || this.$refs.map.mapObject.getBounds()
|
||||
|
||||
this.$emit('on-bounds-update', value)
|
||||
if (this.$refs.map) {
|
||||
setTimeout(() => {
|
||||
this.$refs.map.mapObject.invalidateSize()
|
||||
}, 100)
|
||||
|
||||
value = value || this.$refs.map.mapObject.getBounds()
|
||||
|
||||
this.$emit('on-bounds-update', value)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user