🐛 Fix problem with swap components on grid

This commit is contained in:
alonso.torres 2024-10-22 16:12:58 +02:00
parent 16e1e01234
commit cd586c81ee
10 changed files with 2004 additions and 4 deletions

View file

@ -86,7 +86,8 @@
(when (and (:shapes item) expanded?)
[:div {:class (stl/css-case
:element-children true
:parent-selected selected?)}
:parent-selected selected?)
:data-testid (dm/str "children-" id)}
(for [[index id] (reverse (d/enumerate (:shapes item)))]
(when-let [item (get objects id)]
[:& layer-item

View file

@ -386,7 +386,7 @@
:element-children true
:parent-selected selected?
:sticky-children parent-board?)
:data-id (when ^boolean parent-board? id)}
:data-testid (dm/str "children-" id)}
(for [[index id] (reverse (d/enumerate (:shapes item)))]
(when-let [item (get objects id)]
[:& layer-item

View file

@ -617,6 +617,7 @@
[:button {:class (stl/css-case :component-name-wrapper true
:with-main (and can-swap? (not multi))
:swappeable (and can-swap? (not swap-opened?)))
:data-testid "swap-component-btn"
:on-click open-component-panel}
[:span {:class (stl/css :component-icon)}