From 3046c29ae2f9d44e45a98350fc8b1f1a54cef0e0 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Tue, 12 Nov 2024 09:57:10 +0100 Subject: [PATCH] fix(Calendar): does not display events on the calendar when sliding the carusel to avoid showing overlapping events --- public/js/components/Calendar/Day/Page.js | 6 +++++- public/js/components/Calendar/Pane.js | 14 ++++++++++++-- public/js/components/Calendar/Week/Page.js | 6 +++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/public/js/components/Calendar/Day/Page.js b/public/js/components/Calendar/Day/Page.js index b9f0e34a8..105e5c834 100644 --- a/public/js/components/Calendar/Day/Page.js +++ b/public/js/components/Calendar/Day/Page.js @@ -15,7 +15,8 @@ export default { 'focusDate', 'size', 'events', - 'noMonthView' + 'noMonthView', + 'isSliding' ], props: { year: Number, @@ -39,6 +40,9 @@ export default { return result; }, eventsPerDayAndHour() { + // return early if the calendar pane is sliding + if (this.isSliding) return {}; + const res = {}; this.days.forEach(day => { let key = day.toDateString(); diff --git a/public/js/components/Calendar/Pane.js b/public/js/components/Calendar/Pane.js index 8ff9b6259..f5574b728 100644 --- a/public/js/components/Calendar/Pane.js +++ b/public/js/components/Calendar/Pane.js @@ -6,7 +6,13 @@ export default { return { carousel: null, queue: 0, - offset: 0 + offset: 0, + slideAnimation:false, + } + }, + provide() { + return { + isSliding: Vue.computed(() => this.slideAnimation), } }, computed: { @@ -34,6 +40,10 @@ export default { else this.carousel.prev(); } + this.slideAnimation = false; + }, + slide(evt) { + this.slideAnimation = true; } }, mounted() { @@ -45,7 +55,7 @@ export default { } }, template: ` -