mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 07:36:10 +02:00
Merge pull request #3304 from penpot/alotor-fix-shape-to-path
🐛 Fix problem when transforming shape to path
This commit is contained in:
commit
247c950cce
2 changed files with 10 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
[app.common.data.macros :as dm]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.geom.shapes.path :as upg]
|
||||
[app.common.pages.helpers :as cph]
|
||||
[app.common.path.commands :as upc]
|
||||
[app.common.path.shapes-to-path :as upsp]
|
||||
[app.common.path.subpaths :as ups]
|
||||
|
@ -283,9 +284,12 @@
|
|||
(ptk/reify ::start-path-edit
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [edit-path (dm/get-in state [:workspace-local :edit-path id])
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
edit-path (dm/get-in state [:workspace-local :edit-path id])
|
||||
content (st/get-path state :content)
|
||||
state (st/set-content state (ups/close-subpaths content))]
|
||||
state (cond-> state
|
||||
(cph/path-shape? objects id)
|
||||
(st/set-content (ups/close-subpaths content)))]
|
||||
(cond-> state
|
||||
(or (not edit-path) (= :draw (:edit-mode edit-path)))
|
||||
(assoc-in [:workspace-local :edit-path id] {:edit-mode :move
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue