Skip to content

Commit 7b18b82

Browse files
committed
1.8
1 parent a767402 commit 7b18b82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

resources/assets/component.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ class ComponentCascadeDot {
374374
let node = nodes.pop();
375375
let parentNode = nodes[stack - 1];
376376
let currentStackDocuments = this.STACKS[stack].childNodes;
377+
let to_first_index = null;
377378
currentStackDocuments.forEach((D, index) => {
378379
let data = this.dimensional_data[stack][index];
379380
let parents = data.parentNodes;
@@ -385,6 +386,7 @@ class ComponentCascadeDot {
385386
D.classList.add('dlp-label-silence');
386387
} else {
387388
D.classList.remove('dlp-label-silence');
389+
if (to_first_index === null)to_first_index=index;
388390
}
389391
}
390392
if (checked === true && node === data.key && data.mark !== true) {
@@ -406,6 +408,7 @@ class ComponentCascadeDot {
406408
}
407409
}
408410
});
411+
if(to_first_index !== null) this.STACKS[stack].scrollTop = to_first_index*28;
409412
if (nodes.length > 0) {
410413
this.selectToParent(nodes, checked);
411414
}
@@ -415,6 +418,7 @@ class ComponentCascadeDot {
415418
if (stack > (this.dimensional_data.length - 1)) return;
416419
let currentStackDocuments = this.STACKS[stack].childNodes;
417420
let children = [];
421+
let to_first_index = null;
418422
currentStackDocuments.forEach((D, index) => {
419423
if (nodes === null) {
420424
D.classList.add('dlp-label-silence');
@@ -428,10 +432,12 @@ class ComponentCascadeDot {
428432
if (children.indexOf(child) === -1) children.push(c);
429433
});
430434
}
435+
if (to_first_index === null)to_first_index=index;
431436
} else {
432437
D.classList.add('dlp-label-silence');
433438
}
434439
});
440+
if(to_first_index!==null)this.STACKS[stack].scrollTop = to_first_index*28;
435441
this.selectToChildren(stack + 1, children);
436442
}
437443

0 commit comments

Comments
 (0)