diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-16 00:34:36 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-16 00:34:36 +1100 |
| commit | 1b14b45ac494c090037eb4c5f92321d1aebc59da (patch) | |
| tree | dacf05e3e496e7e17f72fe633f24f517f2c33562 /src/components/TimeLine.vue | |
| parent | 3e40591c87ad8dab0447408d2de7b41ab98a4f4d (diff) | |
Make title clicks reset timelines
Diffstat (limited to 'src/components/TimeLine.vue')
| -rw-r--r-- | src/components/TimeLine.vue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue index f1188cc..56136fd 100644 --- a/src/components/TimeLine.vue +++ b/src/components/TimeLine.vue @@ -102,6 +102,7 @@ const props = defineProps({ unitCountMaps: {type: Object as PropType<Map<number, number>[]>, required: true}, current: {type: Boolean, required: true}, searchTarget: {type: Object as PropType<[null | HistEvent, boolean]>, required: true}, + reset: {type: Boolean, required: true}, }); const emit = defineEmits(['close', 'state-chg', 'event-display', 'info-click']); @@ -1256,6 +1257,15 @@ watch(idToEvent, () => { // Remove highlighting of search results that have beco } }); +// For resets +watch(() => props.reset, () => { + startDate.value = store.initialStartDate; + endDate.value = store.initialEndDate; + startOffset.value = store.defaultEndTickOffset; + endOffset.value = store.defaultEndTickOffset; + initScale(); +}); + // For keyboard shortcuts function onKeyDown(evt: KeyboardEvent){ if (!props.current || store.disableShortcuts){ |
