diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-10-20 15:31:05 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-10-20 15:31:05 +1100 |
| commit | 83366605d1bd43c245c4c110fadfd1a6fd05d3c2 (patch) | |
| tree | a7d0352d2a4d4e14b8113dcfdf28d06a06af20d4 /src/components | |
| parent | f09bfa345519f7d070ae9c7474ef8b4f91b22bae (diff) | |
Add gcal to client-side HistDates
Add YearDate and CalDate
Restrict non-calendar HistDates to years before 4713 BC
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/TimeLine.vue | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue index 5aec9b2..8a6ddc4 100644 --- a/src/components/TimeLine.vue +++ b/src/components/TimeLine.vue @@ -63,9 +63,9 @@ import IconButton from './IconButton.vue'; // Icons import MinusIcon from './icon/MinusIcon.vue'; // Other -import {WRITING_MODE_HORZ, MIN_DATE, MAX_DATE, MONTH_SCALE, DAY_SCALE, SCALES, MIN_CAL_DATE, - HistDate, stepDate, inDateScale, getScaleRatio, getUnitDiff, getDaysInMonth, moduloPositive, TimelineState, - HistEvent, getImagePath} from '../lib'; +import {WRITING_MODE_HORZ, MIN_DATE, MAX_DATE, MONTH_SCALE, DAY_SCALE, SCALES, + MIN_CAL_YEAR, HistDate, CalDate, stepDate, inDateScale, getScaleRatio, getUnitDiff, getDaysInMonth, + moduloPositive, TimelineState, HistEvent, getImagePath} from '../lib'; import {useStore} from '../store'; import {RBTree} from '../rbtree'; @@ -132,6 +132,7 @@ const mainlineOffset = computed(() => { // Distance mainline-area line to side o // Timeline data const ID = props.initialState.id as number; +const MIN_CAL_DATE = new CalDate(MIN_CAL_YEAR, 1, 1); const startDate = ref(props.initialState.startDate); // Earliest date to display const endDate = ref(props.initialState.endDate); const startOffset = ref(store.defaultEndTickOffset); // Fraction of a scale unit before startDate to show |
