Fix ApplyBehaviorsOnSiblings type and performance
This commit is contained in:
parent
191fa9cfa2
commit
5fdee602f1
1 changed files with 8 additions and 3 deletions
|
@ -42,12 +42,17 @@ export function ApplyBehaviors(container: IContainerModel, symbols: Map<string,
|
||||||
* @param symbols
|
* @param symbols
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function ApplyBehaviorsOnSiblings(newContainer: ContainerModel, symbols: Map<string, ISymbolModel>): void {
|
export function ApplyBehaviorsOnSiblings(newContainer: IContainerModel, symbols: Map<string, ISymbolModel>): void {
|
||||||
if (newContainer.parent === null || newContainer.parent === undefined) {
|
if (newContainer.parent === null || newContainer.parent === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
newContainer.parent.children
|
newContainer.parent.children
|
||||||
.filter(container => newContainer !== container)
|
.forEach((container: IContainerModel) => {
|
||||||
.forEach(container => ApplyBehaviors(container, symbols));
|
if (container === newContainer) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplyBehaviors(container, symbols);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue