mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
🐛 Fix wrong type usage on libraries changes.
This commit is contained in:
parent
897f41bc7a
commit
ba211e3cbd
1 changed files with 61 additions and 61 deletions
|
@ -414,22 +414,22 @@
|
||||||
(get component :objects)
|
(get component :objects)
|
||||||
update-new-shape)
|
update-new-shape)
|
||||||
|
|
||||||
rchanges (map (fn [obj]
|
rchanges (mapv (fn [obj]
|
||||||
{:type :add-obj
|
{:type :add-obj
|
||||||
:id (:id obj)
|
:id (:id obj)
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:frame-id (:frame-id obj)
|
:frame-id (:frame-id obj)
|
||||||
:parent-id (:parent-id obj)
|
:parent-id (:parent-id obj)
|
||||||
:ignore-touched true
|
:ignore-touched true
|
||||||
:obj obj})
|
:obj obj})
|
||||||
new-shapes)
|
new-shapes)
|
||||||
|
|
||||||
uchanges (map (fn [obj]
|
uchanges (mapv (fn [obj]
|
||||||
{:type :del-obj
|
{:type :del-obj
|
||||||
:id (:id obj)
|
:id (:id obj)
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:ignore-touched true})
|
:ignore-touched true})
|
||||||
new-shapes)]
|
new-shapes)]
|
||||||
|
|
||||||
(rx/of (dch/commit-changes {:redo-changes rchanges
|
(rx/of (dch/commit-changes {:redo-changes rchanges
|
||||||
:undo-changes uchanges
|
:undo-changes uchanges
|
||||||
|
@ -448,53 +448,53 @@
|
||||||
objects (wsh/lookup-page-objects state page-id)
|
objects (wsh/lookup-page-objects state page-id)
|
||||||
shapes (cp/get-object-with-children id objects)
|
shapes (cp/get-object-with-children id objects)
|
||||||
|
|
||||||
rchanges (map (fn [obj]
|
rchanges (mapv (fn [obj]
|
||||||
{:type :mod-obj
|
{:type :mod-obj
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:id (:id obj)
|
:id (:id obj)
|
||||||
:operations [{:type :set
|
:operations [{:type :set
|
||||||
:attr :component-id
|
:attr :component-id
|
||||||
:val nil}
|
:val nil}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :component-file
|
:attr :component-file
|
||||||
:val nil}
|
:val nil}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :component-root?
|
:attr :component-root?
|
||||||
:val nil}
|
:val nil}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :remote-synced?
|
:attr :remote-synced?
|
||||||
:val nil}
|
:val nil}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :shape-ref
|
:attr :shape-ref
|
||||||
:val nil}
|
:val nil}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :touched
|
:attr :touched
|
||||||
:val nil}]})
|
:val nil}]})
|
||||||
shapes)
|
shapes)
|
||||||
|
|
||||||
uchanges (map (fn [obj]
|
uchanges (mapv (fn [obj]
|
||||||
{:type :mod-obj
|
{:type :mod-obj
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:id (:id obj)
|
:id (:id obj)
|
||||||
:operations [{:type :set
|
:operations [{:type :set
|
||||||
:attr :component-id
|
:attr :component-id
|
||||||
:val (:component-id obj)}
|
:val (:component-id obj)}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :component-file
|
:attr :component-file
|
||||||
:val (:component-file obj)}
|
:val (:component-file obj)}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :component-root?
|
:attr :component-root?
|
||||||
:val (:component-root? obj)}
|
:val (:component-root? obj)}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :remote-synced?
|
:attr :remote-synced?
|
||||||
:val (:remote-synced? obj)}
|
:val (:remote-synced? obj)}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :shape-ref
|
:attr :shape-ref
|
||||||
:val (:shape-ref obj)}
|
:val (:shape-ref obj)}
|
||||||
{:type :set
|
{:type :set
|
||||||
:attr :touched
|
:attr :touched
|
||||||
:val (:touched obj)}]})
|
:val (:touched obj)}]})
|
||||||
shapes)]
|
shapes)]
|
||||||
|
|
||||||
(rx/of (dch/commit-changes {:redo-changes rchanges
|
(rx/of (dch/commit-changes {:redo-changes rchanges
|
||||||
:undo-changes uchanges
|
:undo-changes uchanges
|
||||||
|
|
Loading…
Add table
Reference in a new issue