diff --git a/components/Timetable.vue b/components/Timetable.vue
index 78742f9..07ce65d 100644
--- a/components/Timetable.vue
+++ b/components/Timetable.vue
@@ -77,6 +77,7 @@
@@ -677,6 +678,16 @@ const nowOffset = computed(() => {
offset += group.width;
}
});
+
+const nowLine = useTemplateRef("nowLine"); // If I name the ref now, the element disappears?!
+function scrollToNow() {
+ if (nowLine.value) {
+ nowLine.value.scrollIntoView({ behavior: "smooth", inline: "start", block: "nearest" });
+ }
+}
+defineExpose({
+ scrollToNow,
+});
|