Fix initial render sometimes not being responsive on metric, calendar and cmap

This commit is contained in:
Jože Fortun
2024-01-30 17:46:06 +03:00
committed by Mumbi Francis
parent 9a4e1fa14b
commit b79b61a184
3 changed files with 17 additions and 16 deletions
@@ -76,7 +76,7 @@
<div
:ref="`cc-${blockIndex}`"
class="h-100"
class="d-flex flex-column flex-fill"
>
<div
v-if="processing"
@@ -86,12 +86,13 @@
</div>
<full-calendar
v-show="show && !processing"
v-show="!processing"
:ref="`fc-${blockIndex}`"
:key="key"
:height="getHeight()"
:events="events"
v-bind="config"
class="flex-fill"
@eventClick="handleEventClick"
/>
</div>
@@ -222,9 +223,7 @@ export default {
'block.xywh': {
deep: true,
handler () {
setTimeout(() => {
this.updateSize()
})
this.updateSize()
},
},
},
@@ -249,11 +248,9 @@ export default {
findModuleByID: 'module/findByID',
}),
async updateSize () {
this.show = false
await this.$nextTick(() => {
this.show = true
updateSize () {
this.$nextTick(() => {
this.api().updateSize()
})
},
@@ -350,9 +347,7 @@ export default {
this.processing = false
this.refreshing = false
setTimeout(() => {
this.updateSize()
})
this.updateSize()
})
},
@@ -178,9 +178,13 @@ export default {
}
this.reports = rtr
this.processing = false
this.$nextTick(() => {
this.processing = false
})
} catch {
this.processing = false
this.$nextTick(() => {
this.processing = false
})
}
},
/**
+3 -1
View File
@@ -282,7 +282,9 @@ export default {
onBoundsUpdate (value) {
this.$nextTick(() => {
this.$refs.map.mapObject.invalidateSize()
setTimeout(() => {
this.$refs.map.mapObject.invalidateSize()
}, 100)
})
value = value || this.$refs.map.mapObject.getBounds()