aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-10-11 00:47:29 +1100
committerTerry Truong <terry06890@gmail.com>2022-10-11 00:47:29 +1100
commit314c1c95f77d6e4be559df3a58278f6c37f61e5c (patch)
treeb8906e1190aff13c411299820cd289dda65baba4 /src/App.vue
parent6a46c220406477914c01a77c47016575aab8bdde (diff)
Fix regression where baseline timespans move on startup
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/App.vue b/src/App.vue
index 308137b..f32b367 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -48,10 +48,8 @@ const contentAreaRef = ref(null as HTMLElement | null);
const store = useStore();
// For content sizing (used to decide between horizontal and vertical mode)
-const contentWidth = ref(window.innerWidth);
-const contentHeight = ref(window.innerHeight);
- // Setting this and contentWidth to 0 makes it likely that 'vert' will change on startup,
- // and trigger unwanted transitions (like baseline spans changing size)
+const contentWidth = ref(0);
+const contentHeight = ref(0);
const vert = computed(() => contentHeight.value > contentWidth.value);
function updateAreaDims(){
let contentAreaEl = contentAreaRef.value!;