From e212ec2d3f17f68e237cd46e513cbeff2a65fcdb Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 23 Jan 2023 10:50:17 +1100 Subject: Handle initialisation with wrong dimensions on some devices --- src/App.vue | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 = ref([]); -- cgit v1.2.3