From 4977ba13ed1e8f10ed2a9f227ab0a7ecf3440d0d Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sun, 28 Apr 2024 14:22:32 +0200 Subject: [PATCH] Zoom with ctrl --- js/editor/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/editor/main.js b/js/editor/main.js index 5ece19b..ef6f09c 100644 --- a/js/editor/main.js +++ b/js/editor/main.js @@ -309,6 +309,8 @@ export class Editor extends PrimaryView { // Mouse wheel to zoom this.set_canvas_zoom(1); this.viewport_el.addEventListener('wheel', ev => { + if (!ev.ctrlKey) + return; // The delta is platform and hardware dependent and ultimately kind of useless, so just // treat each event as a click and hope for the best if (ev.deltaY === 0)