aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-23 10:50:17 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-23 10:50:17 +1100
commite212ec2d3f17f68e237cd46e513cbeff2a65fcdb (patch)
treeeb4b12b91e5eed768c2e34283a114ec18a9ed878 /src
parent2f5f6191783d32bf462db14f33c8dddb22990943 (diff)
Handle initialisation with wrong dimensions on some devices
Diffstat (limited to 'src')
-rw-r--r--src/App.vue4
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([]);