Merge pull request #8918 from penpot/niwinz-main-path-preview-issue

🐛 Fix path drawing preview passing shape instead of content to next-node
This commit is contained in:
Elena Torró 2026-04-09 11:48:58 +02:00 committed by GitHub
commit a88f8f1394
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,12 +58,12 @@
last-point (get-in state [:workspace-local :edit-path id :last-point])
position (cond-> (gpt/point x y)
fix-angle? (path.helpers/position-fixed-angle last-point))
shape (st/get-path state)
content (st/get-path state :content)
{:keys [last-point prev-handler]}
(get-in state [:workspace-local :edit-path id])
segment (path/next-node shape position last-point prev-handler)]
segment (path/next-node content position last-point prev-handler)]
(assoc-in state [:workspace-local :edit-path id :preview] segment)))))
(defn add-node