0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 15:39:50 -05:00

Fix unexpected exception on path edition.

This commit is contained in:
Andrey Antukh 2017-02-21 18:19:24 +01:00
parent bedd1def21
commit 8de6311c1f
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -504,7 +504,7 @@
(deftype UpdatePath [id index delta]
ptk/UpdateEvent
(update [_ state]
(update-in state [:shapes id :points index] gpt/add delta)))
(update-in state [:shapes id :segments index] gpt/add delta)))
(defn update-path
"Update a concrete point in the path shape."
@ -516,7 +516,7 @@
ptk/WatchEvent
(watch [_ state s]
(let [shape (get-in state [:shapes id])
point (get-in shape [:points index])
point (get-in shape [:segments index])
point (gpt/add point canvas-coords)]
(->> (uwrk/align-point point)
(rx/map #(gpt/subtract % point))