mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 21:09:00 -05:00
Code cleaning on drawarea.
This commit is contained in:
parent
d6d38d207d
commit
53621ceeeb
1 changed files with 6 additions and 6 deletions
|
@ -79,12 +79,12 @@
|
|||
[{:keys [points] :as shape}]
|
||||
(letfn [(on-click [event]
|
||||
(dom/stop-propagation event)
|
||||
(swap! drawing-shape
|
||||
(fn [shape]
|
||||
(let [points (:points shape)
|
||||
points (vec (butlast points))]
|
||||
(assoc shape :points points :close? true))))
|
||||
(rx/push! drawing-stoper true))]
|
||||
(swap! drawing-shape drop-last-point)
|
||||
(rx/push! drawing-stoper true))
|
||||
(drop-last-point [shape]
|
||||
(let [points (:points shape)
|
||||
points (vec (butlast points))]
|
||||
(assoc shape :points points :close? true)))]
|
||||
(let [{:keys [x y]} (first points)]
|
||||
[:g
|
||||
(-> (assoc shape :drawing? true)
|
||||
|
|
Loading…
Add table
Reference in a new issue