From 6a21aa07c0bd6f601206cc12e659ebd6319364b6 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sun, 18 Dec 2022 22:24:00 +1100 Subject: Make BaseLine spans more visible Increase min-length to 3px, add margin around BaseLine Fix non-visibility on startup --- src/components/TimeLine.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/components/TimeLine.vue') diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue index 7d37ca8..413c163 100644 --- a/src/components/TimeLine.vue +++ b/src/components/TimeLine.vue @@ -172,6 +172,7 @@ function initScale(){ // Initialises to smallest usable scale } } } + onStateChg(); } function getYearlyScale(startDate: HistDate, endDate: HistDate, availLen: number){ // Get the smallest yearly scale that divides a date range, without making ticks too close @@ -905,11 +906,12 @@ function onShiftWheel(evt: WheelEvent){ } // For bound-change signalling -watch(startDate, () => { +function onStateChg(){ emit('state-chg', new TimelineState( ID, startDate.value, endDate.value, startOffset.value, endOffset.value, scaleIdx.value )); -}); +} +watch(startDate, onStateChg); // For skipping transitions on startup (and on horz/vert swap) const skipTransition = ref(true); -- cgit v1.2.3