mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
🐛 Fix exit edit path mode
This commit is contained in:
parent
1beb39ff60
commit
bd9874cf28
2 changed files with 9 additions and 13 deletions
|
@ -168,13 +168,6 @@
|
||||||
;; Toolbar
|
;; Toolbar
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defn toggle-toolbar-visibility
|
|
||||||
[]
|
|
||||||
(ptk/reify ::toggle-toolbar-visibility
|
|
||||||
ptk/UpdateEvent
|
|
||||||
(update [_ state]
|
|
||||||
(update-in state [:workspace-local :hide-toolbar] not))))
|
|
||||||
|
|
||||||
(defn hide-toolbar
|
(defn hide-toolbar
|
||||||
[]
|
[]
|
||||||
(ptk/reify ::hide-toolbar
|
(ptk/reify ::hide-toolbar
|
||||||
|
@ -188,3 +181,10 @@
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(assoc-in state [:workspace-local :hide-toolbar] false))))
|
(assoc-in state [:workspace-local :hide-toolbar] false))))
|
||||||
|
|
||||||
|
(defn toggle-toolbar-visibility
|
||||||
|
[]
|
||||||
|
(ptk/reify ::toggle-toolbar-visibility
|
||||||
|
ptk/UpdateEvent
|
||||||
|
(update [_ state]
|
||||||
|
(update-in state [:workspace-local :hide-toolbar] not))))
|
||||||
|
|
|
@ -22,13 +22,9 @@
|
||||||
(defn esc-pressed []
|
(defn esc-pressed []
|
||||||
(ptk/reify ::esc-pressed
|
(ptk/reify ::esc-pressed
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ _ _]
|
||||||
;; Not interrupt when we're editing a path
|
;; Not interrupt when we're editing a path
|
||||||
(let [edition-id (or (get-in state [:workspace-drawing :object :id])
|
(rx/of :interrupt))))
|
||||||
(get-in state [:workspace-local :edition]))
|
|
||||||
path-edit-mode (get-in state [:workspace-local :edit-path edition-id :edit-mode])]
|
|
||||||
(when-not (= :draw path-edit-mode)
|
|
||||||
(rx/of :interrupt))))))
|
|
||||||
|
|
||||||
(def shortcuts
|
(def shortcuts
|
||||||
{:move-nodes {:tooltip "M"
|
{:move-nodes {:tooltip "M"
|
||||||
|
|
Loading…
Reference in a new issue