diff options
Diffstat (limited to 'src/components')
| -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){ |
