From 7a80297d3154eb8c03cb4a171092fdd7f273de3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 30 Oct 2020 09:31:20 +0100 Subject: [PATCH] :bug: Fix position bug when syncing component with several nested --- .../app/main/data/workspace/libraries_helpers.cljs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index 05665e212..0c91cfffa 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -434,6 +434,12 @@ (let [component-shape (d/seek #(= (:shape-ref %) (:shape-ref shape)) (vals (:objects component))) + root-shape (if (:component-id shape) + shape + root-shape) + root-component (if (:component-id shape) + component-shape + root-component) [rchanges uchanges] (update-attrs shape @@ -541,6 +547,12 @@ (let [component-shape (d/seek #(= (:shape-ref %) (:shape-ref shape)) (vals (:objects component))) + root-shape (if (:component-id shape) + shape + root-shape) + root-component (if (:component-id shape) + component-shape + root-component) [rchanges uchanges] (update-attrs component-shape