mirror of
https://github.com/penpot/penpot.git
synced 2025-07-08 00:27:16 +02:00
🐛 Fix problem with boolean and children objects
This commit is contained in:
parent
61c111d5ae
commit
af22fee0c1
3 changed files with 6 additions and 6 deletions
|
@ -22,7 +22,7 @@
|
||||||
(def dissoc-attrs
|
(def dissoc-attrs
|
||||||
[:x :y :width :height
|
[:x :y :width :height
|
||||||
:rx :ry :r1 :r2 :r3 :r4
|
:rx :ry :r1 :r2 :r3 :r4
|
||||||
:metadata :shapes])
|
:metadata])
|
||||||
|
|
||||||
(def allowed-transform-types
|
(def allowed-transform-types
|
||||||
#{:rect
|
#{:rect
|
||||||
|
@ -199,7 +199,6 @@
|
||||||
(map #(convert-to-path % objects)))
|
(map #(convert-to-path % objects)))
|
||||||
bool-type (:bool-type shape)
|
bool-type (:bool-type shape)
|
||||||
content (pb/content-bool bool-type (mapv :content children))]
|
content (pb/content-bool bool-type (mapv :content children))]
|
||||||
|
|
||||||
(-> shape
|
(-> shape
|
||||||
(assoc :type :path)
|
(assoc :type :path)
|
||||||
(assoc :content content)
|
(assoc :content content)
|
||||||
|
|
|
@ -104,8 +104,9 @@
|
||||||
|
|
||||||
(update-in state path cp/process-changes redo-changes false)
|
(update-in state path cp/process-changes redo-changes false)
|
||||||
|
|
||||||
(catch :default e
|
(catch :default err
|
||||||
(vreset! error e)
|
(log/error :js/error err)
|
||||||
|
(vreset! error err)
|
||||||
state))))
|
state))))
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
changes
|
changes
|
||||||
(-> (pcb/empty-changes it page-id)
|
(-> (pcb/empty-changes it page-id)
|
||||||
(pcb/with-objects objects)
|
(pcb/with-objects objects)
|
||||||
(pcb/remove-objects children-ids)
|
(pcb/update-shapes selected #(upsp/convert-to-path % objects))
|
||||||
(pcb/update-shapes selected #(upsp/convert-to-path % objects)))]
|
(pcb/remove-objects children-ids))]
|
||||||
|
|
||||||
(rx/of (dch/commit-changes changes))))))
|
(rx/of (dch/commit-changes changes))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue