0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-14 11:09:04 -05:00

Now you can draw n figures without selecting again the tool

This commit is contained in:
Jesús Espino 2016-04-15 17:25:51 +02:00
parent 48171bbecc
commit b9e3e9f7d4

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