aboutsummaryrefslogtreecommitdiff
path: root/src/components/TimeLine.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-10-15 14:15:46 +1100
committerTerry Truong <terry06890@gmail.com>2022-10-15 14:15:46 +1100
commit0c8b0a7513ccf457556db1486beb092265c594a3 (patch)
treee3f6293d2a32ba1830e3662def75c65c0d705f9f /src/components/TimeLine.vue
parent3932d067cfca46130a82f95ac40638ebfeca5181 (diff)
Make BaseLine spans use TimeLine start/end offsets
Change TimelineRange to hold years not HistDates
Diffstat (limited to 'src/components/TimeLine.vue')
-rw-r--r--src/components/TimeLine.vue8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 22069bc..281f4e4 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -630,7 +630,13 @@ function onShiftWheel(evt: WheelEvent){
// For bound-change signalling
watch(startDate, () => {
- emit('range-chg', [startDate.value, endDate.value]);
+ let startYear = startDate.value.year;
+ let endYear = endDate.value.year;
+ if (scale.value != MONTH_SCALE && scale.value != DAY_SCALE){ // Possibly incorporate offsets
+ startYear -= startOffset.value * scale.value;
+ endYear += endOffset.value * scale.value;
+ }
+ emit('range-chg', [startYear, endYear]);
});
// For skipping transitions on startup (and on horz/vert swap)