mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 18:36:13 +02:00
✨ Refactor of shortcuts and adaptations for macosx
This commit is contained in:
parent
526e0afc70
commit
816db29f9c
19 changed files with 762 additions and 434 deletions
|
@ -16,6 +16,7 @@
|
|||
[app.common.geom.shapes :as geom]
|
||||
[app.common.pages :as cp]
|
||||
[app.main.data.viewer :as dv]
|
||||
[app.main.data.viewer.shortcuts :as sc]
|
||||
[app.main.data.comments :as dcm]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
|
@ -214,7 +215,7 @@
|
|||
|
||||
on-mouse-wheel
|
||||
(fn [event]
|
||||
(when (kbd/ctrl? event)
|
||||
(when (or (kbd/ctrl? event) (kbd/meta? event))
|
||||
(dom/prevent-default event)
|
||||
(let [event (.getBrowserEvent ^js event)
|
||||
delta (+ (.-deltaY ^js event) (.-deltaX ^js event))]
|
||||
|
@ -240,7 +241,7 @@
|
|||
(events/unlistenByKey key3))))]
|
||||
|
||||
(mf/use-effect on-mount)
|
||||
(hooks/use-shortcuts dv/shortcuts)
|
||||
(hooks/use-shortcuts sc/shortcuts)
|
||||
|
||||
[:& fs/fullscreen-wrapper {}
|
||||
[:div.viewer-layout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue