mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 03:56:12 +02:00
🐛 Fix shift+wheel to horizontal scrolling in MacOS
This commit is contained in:
parent
dbbb0a4a3d
commit
679c630a4d
2 changed files with 4 additions and 1 deletions
|
@ -363,12 +363,14 @@
|
|||
delta-y (-> (.-deltaY ^js event)
|
||||
(* unit)
|
||||
(/ zoom))
|
||||
|
||||
delta-x (-> (.-deltaX ^js event)
|
||||
(* unit)
|
||||
(/ zoom))]
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
(if (kbd/shift? event)
|
||||
(if (and (not (cfg/check-platform? :macos)) ;; macos sends delta-x automaticaly, don't need to do it
|
||||
(kbd/shift? event))
|
||||
(st/emit! (dw/update-viewport-position {:x #(+ % delta-y)}))
|
||||
(st/emit! (dw/update-viewport-position {:x #(+ % delta-x)
|
||||
:y #(+ % delta-y)})))))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue