From 44051e51f99fe7e94f37d567d621fa13399c17f1 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Fri, 29 May 2026 09:02:17 +0200 Subject: timeline: separate keyboard and pinch zooming logic --- src/web/component/timeline/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/web/component/timeline/index.js b/src/web/component/timeline/index.js index f83a159..81322c6 100644 --- a/src/web/component/timeline/index.js +++ b/src/web/component/timeline/index.js @@ -64,6 +64,13 @@ const zoom = new (class { behavior: 'instant', }); } + + increase_line_by(n) { + this.committed = Math.min(Math.max(this.committed + n, 1), 20); + container.style.gridTemplateColumns = `repeat(${this.committed}, 1fr)`; + container.classList.toggle('tiling', this.committed != 1); + container.style.transform = 'scale(1)'; + } }); Z.document.onwheel = (event) => { @@ -71,7 +78,7 @@ Z.document.onwheel = (event) => { return; } event.preventDefault(); - // TODO + zoom.increase_line_by(event.wheelDeltaY / 120); }; const pinch = new Pinch(Z.document); -- cgit v1.2.3-70-g09d2