From bbf918c76ab06d543a4a307adb8acadb765f33e0 Mon Sep 17 00:00:00 2001 From: Michael Bauer <michael-bauer@posteo.de> Date: Thu, 18 Apr 2024 11:06:51 +0200 Subject: [PATCH] Show first or last day in url if visible regardless of its position --- .../alsijil/frontend/components/coursebook/Coursebook.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue index 45e8b9e17..9dd9e727b 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue @@ -249,7 +249,9 @@ export default { if (entry.isIntersecting) { // TODO: Make 165 a var? - if (entry.boundingClientRect.top <= 165) { + if ((entry.boundingClientRect.top <= 165) + || first + || last) { console.log('@', date.toISODate()); this.setDate(date.toISODate()); } -- GitLab