diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.vue | 6 | ||||
| -rw-r--r-- | src/components/TimeLine.vue | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue index 95009e7..d422a41 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,8 +41,10 @@ import HelpIcon from './components/icon/HelpIcon.vue'; const contentAreaRef = ref(null as HTMLElement | null); // For content sizing -const contentWidth = ref(0); -const contentHeight = ref(0); +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) function updateAreaDims(){ let contentAreaEl = contentAreaRef.value!; contentWidth.value = contentAreaEl.offsetWidth; diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue index 2cdf31f..e5da628 100644 --- a/src/components/TimeLine.vue +++ b/src/components/TimeLine.vue @@ -50,13 +50,14 @@ const props = defineProps({ }); const emit = defineEmits(['close', 'bound-chg']); -// For skipping transitions on horz/vert swap -const skipTransition = ref(false); -const prevVert = ref(props.vert); +// For skipping transitions on startup (and horz/vert switch) +const skipTransition = ref(true); +onMounted(() => setTimeout(() => {skipTransition.value = false}, 100)); // For size tracking const width = ref(0); const height = ref(0); +const prevVert = ref(props.vert); const WRITING_MODE_HORZ = window.getComputedStyle(document.body)['writing-mode'].startsWith('horizontal'); const resizeObserver = new ResizeObserver((entries) => { for (const entry of entries){ |
