#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];
|
const queue: Node[] = [rootNode];
|
||||||
while (queue.length > 0) {
|
while (queue.length > 0) {
|
||||||
let levelSize = queue.length;
|
let levelSize = queue.length;
|
||||||
|
const maxLevelSize = levelSize - 1;
|
||||||
while (levelSize-- !== 0) {
|
while (levelSize-- !== 0) {
|
||||||
const node = queue.shift() as Node;
|
const node = queue.shift() as Node;
|
||||||
|
|
||||||
|
@ -334,12 +335,13 @@ function InitializeChildrenWithPattern(
|
||||||
if (pattern.children === undefined) {
|
if (pattern.children === undefined) {
|
||||||
// Add Container
|
// Add Container
|
||||||
const containerConfig = node.containerOrPattern as IAvailableContainer;
|
const containerConfig = node.containerOrPattern as IAvailableContainer;
|
||||||
|
const index = maxLevelSize - levelSize;
|
||||||
AddNewContainerToParent(
|
AddNewContainerToParent(
|
||||||
containerConfig,
|
containerConfig,
|
||||||
configuration,
|
configuration,
|
||||||
containers,
|
containers,
|
||||||
node.parent,
|
node.parent,
|
||||||
0, 0,
|
index, 0,
|
||||||
newCounters,
|
newCounters,
|
||||||
symbols
|
symbols
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue