diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-23 10:50:17 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-23 10:50:17 +1100 |
| commit | e212ec2d3f17f68e237cd46e513cbeff2a65fcdb (patch) | |
| tree | eb4b12b91e5eed768c2e34283a114ec18a9ed878 | |
| parent | 2f5f6191783d32bf462db14f33c8dddb22990943 (diff) | |
Handle initialisation with wrong dimensions on some devices
| -rw-r--r-- | src/App.vue | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue index 20db479..96baefd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -117,6 +117,10 @@ function updateAreaDims(){ onMounted(updateAreaDims); +// Kludge for some devices that don't provide the right dimensions until some time after mounting +onMounted(() => setTimeout(updateAreaDims, store.transitionDuration)); +onMounted(() => setTimeout(updateAreaDims, store.transitionDuration * 2)); + // ========== Timeline data ========== const timelines: Ref<TimelineState[]> = ref([]); |
