From da1f8bb4f10f607d3e8d4d493faaecbce2bce4b4 Mon Sep 17 00:00:00 2001 From: sora-ext Date: Mon, 3 Mar 2025 17:51:50 +0100 Subject: [PATCH] Update src/client/old.js --- src/client/old.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/old.js b/src/client/old.js index 419b1dd..ebb97bd 100644 --- a/src/client/old.js +++ b/src/client/old.js @@ -226,7 +226,15 @@ const app = new Vue({ if (e.which === 13) { } }, + + focus_leg(idx) { + const c = document.querySelector('.scroll-content') + const item = c.children[(idx != undefined ? idx : this.journey.sel_leg) + 1]; + c.scrollLeft = item.offsetLeft + (item.offsetWidth / 2) - c.offsetWidth / 2 + }, + nav_mousemove(e) { + if (e.pointerType != 'mouse') return; const c = document.querySelector('.scroll-content') const left = e.pageX - c.getBoundingClientRect().left; const newDir =