mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 16:09:01 +00:00
Code cleaning on drawarea.
This commit is contained in:
parent
d6d38d207d
commit
53621ceeeb
@ -79,12 +79,12 @@
|
|||||||
[{:keys [points] :as shape}]
|
[{:keys [points] :as shape}]
|
||||||
(letfn [(on-click [event]
|
(letfn [(on-click [event]
|
||||||
(dom/stop-propagation event)
|
(dom/stop-propagation event)
|
||||||
(swap! drawing-shape
|
(swap! drawing-shape drop-last-point)
|
||||||
(fn [shape]
|
(rx/push! drawing-stoper true))
|
||||||
(let [points (:points shape)
|
(drop-last-point [shape]
|
||||||
points (vec (butlast points))]
|
(let [points (:points shape)
|
||||||
(assoc shape :points points :close? true))))
|
points (vec (butlast points))]
|
||||||
(rx/push! drawing-stoper true))]
|
(assoc shape :points points :close? true)))]
|
||||||
(let [{:keys [x y]} (first points)]
|
(let [{:keys [x y]} (first points)]
|
||||||
[:g
|
[:g
|
||||||
(-> (assoc shape :drawing? true)
|
(-> (assoc shape :drawing? true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user