#7344 Fix AddContainer pattern wrong order
This commit is contained in:
parent
639480678d
commit
d778e85b99
1 changed files with 3 additions and 1 deletions
|
@ -326,6 +326,7 @@ function InitializeChildrenWithPattern(
|
|||
const queue: Node[] = [rootNode];
|
||||
while (queue.length > 0) {
|
||||
let levelSize = queue.length;
|
||||
const maxLevelSize = levelSize - 1;
|
||||
while (levelSize-- !== 0) {
|
||||
const node = queue.shift() as Node;
|
||||
|
||||
|
@ -334,12 +335,13 @@ function InitializeChildrenWithPattern(
|
|||
if (pattern.children === undefined) {
|
||||
// Add Container
|
||||
const containerConfig = node.containerOrPattern as IAvailableContainer;
|
||||
const index = maxLevelSize - levelSize;
|
||||
AddNewContainerToParent(
|
||||
containerConfig,
|
||||
configuration,
|
||||
containers,
|
||||
node.parent,
|
||||
0, 0,
|
||||
index, 0,
|
||||
newCounters,
|
||||
symbols
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue