diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-10-18 19:44:04 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-10-18 19:46:06 +1100 |
| commit | c7e965fc3dc6ffe01e6d4823d56f7b604fef6270 (patch) | |
| tree | 39acc135b87e42c5174c81f311755689f4e29f0d /src/components | |
| parent | fd1579191203c770f7c3b3dec53f8fdbeab3f971 (diff) | |
Reduce event data after reaching a memory limit
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/TimeLine.vue | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue index 6c6b6fc..577413d 100644 --- a/src/components/TimeLine.vue +++ b/src/components/TimeLine.vue @@ -67,7 +67,7 @@ const props = defineProps({ initialState: {type: Object as PropType<TimelineState>, required: true}, eventTree: {type: Object as PropType<RBTree<HistEvent>>, required: true}, }); -const emit = defineEmits(['remove', 'state-chg', 'event-req']); +const emit = defineEmits(['remove', 'state-chg', 'event-req', 'event-display']); // For size tracking const width = ref(0); @@ -285,6 +285,8 @@ const idToPos = computed(() => { // If more events could be displayed, notify parent if (map.size < 3 && !pendingReq){ emit('event-req', startDate.value, endDate.value); + } else { // Send displayed event IDs to parent + emit('event-display', [...idToEvent.value.keys()], ID); } pendingReq = true; // |
