mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 16:37:15 +02:00
Fix unexpected exception on path edition.
This commit is contained in:
parent
bedd1def21
commit
8de6311c1f
1 changed files with 2 additions and 2 deletions
|
@ -504,7 +504,7 @@
|
||||||
(deftype UpdatePath [id index delta]
|
(deftype UpdatePath [id index delta]
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(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
|
(defn update-path
|
||||||
"Update a concrete point in the path shape."
|
"Update a concrete point in the path shape."
|
||||||
|
@ -516,7 +516,7 @@
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state s]
|
(watch [_ state s]
|
||||||
(let [shape (get-in state [:shapes id])
|
(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)]
|
point (gpt/add point canvas-coords)]
|
||||||
(->> (uwrk/align-point point)
|
(->> (uwrk/align-point point)
|
||||||
(rx/map #(gpt/subtract % point))
|
(rx/map #(gpt/subtract % point))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue