Update src/client/old.js
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
sora-ext 2025-03-03 17:51:50 +01:00
parent 63d42c47be
commit da1f8bb4f1

View File

@ -226,7 +226,15 @@ const app = new Vue({
if (e.which === 13) { 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) { nav_mousemove(e) {
if (e.pointerType != 'mouse') return;
const c = document.querySelector('.scroll-content') const c = document.querySelector('.scroll-content')
const left = e.pageX - c.getBoundingClientRect().left; const left = e.pageX - c.getBoundingClientRect().left;
const newDir = const newDir =