diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-15 01:29:40 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-15 01:29:40 +1100 |
| commit | e045f6461b5ceabb285b00fb9db0050a3d1f9d8d (patch) | |
| tree | 0ea5549e90cb4550aedb46299942db969e72648e /src/components | |
| parent | 5c127e53a329ff694088f46b4e0a5588b99cb2eb (diff) | |
Fix event lines not updating on certain resizes
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/TimeLine.vue | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue index bab6e5e..c72fbff 100644 --- a/src/components/TimeLine.vue +++ b/src/components/TimeLine.vue @@ -636,7 +636,7 @@ function getEventLayout(): Map<number, [number, number, number, number]> { } return map; } -watch(idToEvent, () => { // Updates idToPos and eventLines +function updateLayout(){ // Updates idToPos and eventLines let map = getEventLayout(); // Check for events that cross mainline idsToSkipTransition.value.clear(); @@ -705,7 +705,10 @@ watch(idToEvent, () => { // Updates idToPos and eventLines eventLines.value = newEventLines; // Notify parent emit('event-display', ID, [...map.keys()], firstDate.value, lastDate.value, minorScaleIdx.value); -}); +} +watch(idToEvent, updateLayout); +watch(width, updateLayout); +watch(height, updateLayout); // For event-count indicators const tickToCount = computed((): Map<number, number> => { |
