mirror of
https://github.com/penpot/penpot.git
synced 2025-02-15 19:48:22 -05:00
Merge pull request #13 from uxbox/not-deselect-tool-on-draw
Not deselect tool on draw and deselect tool on esc
This commit is contained in:
commit
6571c29c1d
2 changed files with 5 additions and 5 deletions
|
@ -320,7 +320,9 @@
|
|||
(reify
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(assoc-in state [:workspace :selected] #{}))))
|
||||
(-> state
|
||||
(assoc-in [:workspace :selected] #{})
|
||||
(assoc-in [:workspace :drawing] nil)))))
|
||||
|
||||
(defn group-selected
|
||||
[]
|
||||
|
|
|
@ -89,8 +89,7 @@
|
|||
(let [{:keys [x y]} (gpt/divide @wb/mouse-canvas-a @wb/zoom-l)
|
||||
props {:x1 x :y1 y :x2 (+ x 100) :y2 (+ y 100)}
|
||||
shape (ush/initialize shape props)]
|
||||
(rs/emit! (uds/add-shape shape)
|
||||
(udw/select-for-drawing nil))))
|
||||
(rs/emit! (uds/add-shape shape))))
|
||||
|
||||
(defn- initialize-shape-drawing
|
||||
"A drawing handler for generic shapes such as rect, circle, text, etc."
|
||||
|
@ -103,8 +102,7 @@
|
|||
(let [shape @drawing-shape
|
||||
shpos @drawing-position
|
||||
shape (ush/resize shape shpos)]
|
||||
(rs/emit! (uds/add-shape shape)
|
||||
(udw/select-for-drawing nil))
|
||||
(rs/emit! (uds/add-shape shape))
|
||||
(reset! drawing-position nil)
|
||||
(reset! drawing-shape nil)))]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue