🐛 Fix problem with zoom with wheel in Firefox

This commit is contained in:
alonso.torres 2022-04-20 10:40:07 +02:00
parent 31ec4092ed
commit cc046555a3

View file

@ -393,7 +393,7 @@
(* unit) (* unit)
(/ zoom))] (/ zoom))]
(if (or ctrl? mod?) (if (or ctrl? mod?)
(let [delta (* -1 (+ (.-deltaY ^js event) (.-deltaX ^js event))) (let [delta (* -1 (+ delta-y delta-x))
scale (-> (+ 1 (/ delta 100)) (mth/clamp 0.77 1.3))] scale (-> (+ 1 (/ delta 100)) (mth/clamp 0.77 1.3))]
(st/emit! (dw/set-zoom pt scale))) (st/emit! (dw/set-zoom pt scale)))
(if (and (not (cfg/check-platform? :macos)) (if (and (not (cfg/check-platform? :macos))