Fix flex not applying when moving symbols

This commit is contained in:
Eric NGUYEN 2022-08-31 10:46:32 +02:00
parent 08f98bd40f
commit 191fa9cfa2
3 changed files with 20 additions and 19 deletions

View file

@ -35,3 +35,19 @@ export function ApplyBehaviors(container: IContainerModel, symbols: Map<string,
return container;
}
/**
* Iterate over the siblings of newContainer and apply the behaviors
* @param newContainer
* @param symbols
* @returns
*/
export function ApplyBehaviorsOnSiblings(newContainer: ContainerModel, symbols: Map<string, ISymbolModel>): void {
if (newContainer.parent === null || newContainer.parent === undefined) {
return;
}
newContainer.parent.children
.filter(container => newContainer !== container)
.forEach(container => ApplyBehaviors(container, symbols));
}