🐛 Preserve root shape position on parent when create component

This commit is contained in:
Andrés Moya 2023-06-02 17:57:21 +02:00
parent 8c3f90fe36
commit bca90c54e9

View file

@ -90,7 +90,7 @@
(cond-> (nil? index) (cond-> (nil? index)
(pcb/add-object shape)) (pcb/add-object shape))
(cond-> (some? (:parent-id attrs)) (cond-> (some? (:parent-id attrs))
(pcb/change-parent (:parent-id attrs) [shape])) (pcb/change-parent (:parent-id attrs) [shape] index))
(cond-> (ctl/grid-layout? objects (:parent-id shape)) (cond-> (ctl/grid-layout? objects (:parent-id shape))
(pcb/update-shapes [(:parent-id shape)] ctl/assign-cells)))] (pcb/update-shapes [(:parent-id shape)] ctl/assign-cells)))]