From 60ff7f412ad5f15945cf6ff102546497dc274fb6 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Wed, 19 Oct 2022 14:08:15 +0200 Subject: [PATCH] Fix SortChildren in SetContainer --- src/Components/Editor/Actions/ContainerOperations.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Components/Editor/Actions/ContainerOperations.ts b/src/Components/Editor/Actions/ContainerOperations.ts index 3e8525e..f264f5a 100644 --- a/src/Components/Editor/Actions/ContainerOperations.ts +++ b/src/Components/Editor/Actions/ContainerOperations.ts @@ -289,17 +289,17 @@ function SetContainer( symbols ); - // sort the children list by their position - const parent = FindContainerById(containers, container.properties.parentId); - if (parent !== null && parent !== undefined) { - SortChildren(containers, parent); - } - // Apply special behaviors: rigid, flex, symbol, anchor ApplyBehaviors(containers, container, symbols); // Apply special behaviors on siblings ApplyBehaviorsOnSiblingsChildren(containers, container, symbols); + + // sort the children list by their position + const parent = FindContainerById(containers, container.properties.parentId); + if (parent !== null && parent !== undefined) { + SortChildren(containers, parent); + } } /**