aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/web/component/timeline/index.js9
1 files changed, 8 insertions, 1 deletions
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);