🐛 When duplicating a main component from the assets tab, the new component should be next to it.

This commit is contained in:
Pablo Alba 2023-09-21 11:44:29 +02:00 committed by Andrés Moya
parent afa7931b0e
commit e9bd769823

View file

@ -134,7 +134,7 @@
(let [main-instance-page (ctf/get-component-page library-data component)
main-instance-shape (ctf/get-component-root library-data component)
position (gpt/point (:x main-instance-shape) (:y main-instance-shape))
position (gpt/point (+ (:x main-instance-shape) (:width main-instance-shape) 50) (:y main-instance-shape))
options (if components-v2 {:main-instance? true} {})
[new-instance-shape new-instance-shapes]