From f61be8b7439e81f63d8c9b222d09e5969b8b22af Mon Sep 17 00:00:00 2001 From: Ruben Rozeboom Date: Mon, 31 Jul 2023 04:57:52 +0200 Subject: [PATCH] Changed zoom speed; On Mac, the previous speed was too fast --- web/lib/litegraph.core.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/lib/litegraph.core.js b/web/lib/litegraph.core.js index 2a33bd4a7..5a1102101 100644 --- a/web/lib/litegraph.core.js +++ b/web/lib/litegraph.core.js @@ -6879,10 +6879,11 @@ LGraphNode.prototype.executeAction = function(action) var scale = this.ds.scale; - if (delta > 0) { - scale *= 1.1; + scroll_sensitivity = 500; // maybe this in a general config + if (delta > 0) { + scale *= 1 + (delta / scroll_sensitivity); } else if (delta < 0) { - scale *= 1 / 1.1; + scale *= 1 + (delta / scroll_sensitivity); } //this.setZoom( scale, [ e.clientX, e.clientY ] );