From e32e98cddd9b178e7d3024f766fc2e399fd40de7 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Wed, 14 Sep 2022 11:36:43 +0200 Subject: [PATCH] Fix flex again because of wrong order of container --- 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 3e87c12..7950f31 100644 --- a/src/Components/Editor/Actions/ContainerOperations.ts +++ b/src/Components/Editor/Actions/ContainerOperations.ts @@ -285,15 +285,15 @@ export function AddContainers( /// Handle behaviors here /// - // Initialize default children of the container - InitializeDefaultChild(configuration, containerConfig, newContainer, newCounters); - // Apply the behaviors (flex, rigid, anchor) ApplyBehaviors(newContainer, current.symbols); // Then, apply the behaviors on its siblings (mostly for flex) ApplyBehaviorsOnSiblingsChildren(newContainer, current.symbols); + // Initialize default children of the container + InitializeDefaultChild(configuration, containerConfig, newContainer, newCounters); + // Add to the list of container id for logging purpose containerIds.push(newContainer.properties.id); }); @@ -549,14 +549,14 @@ function SetContainer( container.properties.linkedSymbolId, symbols ); - // sort the children list by their position - UpdateParentChildrenList(container.parent); - // Apply special behaviors: rigid, flex, symbol, anchor ApplyBehaviors(container, symbols); // Apply special behaviors on siblings ApplyBehaviorsOnSiblingsChildren(container, symbols); + + // sort the children list by their position + UpdateParentChildrenList(container.parent); } /**