0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

🐛 Fixes problem on shape creation

This commit is contained in:
alonso.torres 2021-05-17 11:34:39 +02:00
parent 93d8c171be
commit ea22f3f81c
3 changed files with 8 additions and 4 deletions

View file

@ -28,7 +28,6 @@
(watch [_ state stream]
(let [shape (get-in state [:workspace-drawing :object])]
(rx/concat
(rx/of clear-drawing)
(when (:initialized? shape)
(let [page-id (:current-page-id state)
shape-click-width (case (:type shape)
@ -65,4 +64,8 @@
:page-id page-id
:rect (:selrect shape)})
(rx/map #(dwc/move-shapes-into-frame (:id shape) %)))
(rx/empty))))))))))
(rx/empty)))))
;; Delay so the mouse event can read the drawing state
(->> (rx/of clear-drawing)
(rx/delay 0)))))))

View file

@ -142,7 +142,7 @@
(not selected?)
(not edition)
(not drawing-path?)
(not (#{:comments :path} drawing-tool)))
(not drawing-tool))
(st/emit! (dw/select-shape (:id @hover)))))))))
(defn on-double-click

View file

@ -99,7 +99,8 @@
(timers/schedule
(fn []
(st/emit! (dwc/update-shapes [@shape-id]
#(assoc % :thumbnail data)))
#(assoc % :thumbnail data)
{:save-undo? false}))
(rx/push! next :next)))))
on-frame-not-found