0
Fork 0
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:
Andrey Antukh 2016-04-15 19:09:27 +03:00
commit 6571c29c1d
2 changed files with 5 additions and 5 deletions

View file

@ -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
[]

View file

@ -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)))]