@@ -374,6 +374,7 @@ class ComponentCascadeDot {
374
374
let node = nodes . pop ( ) ;
375
375
let parentNode = nodes [ stack - 1 ] ;
376
376
let currentStackDocuments = this . STACKS [ stack ] . childNodes ;
377
+ let to_first_index = null ;
377
378
currentStackDocuments . forEach ( ( D , index ) => {
378
379
let data = this . dimensional_data [ stack ] [ index ] ;
379
380
let parents = data . parentNodes ;
@@ -385,6 +386,7 @@ class ComponentCascadeDot {
385
386
D . classList . add ( 'dlp-label-silence' ) ;
386
387
} else {
387
388
D . classList . remove ( 'dlp-label-silence' ) ;
389
+ if ( to_first_index === null ) to_first_index = index ;
388
390
}
389
391
}
390
392
if ( checked === true && node === data . key && data . mark !== true ) {
@@ -406,6 +408,7 @@ class ComponentCascadeDot {
406
408
}
407
409
}
408
410
} ) ;
411
+ if ( to_first_index !== null ) this . STACKS [ stack ] . scrollTop = to_first_index * 28 ;
409
412
if ( nodes . length > 0 ) {
410
413
this . selectToParent ( nodes , checked ) ;
411
414
}
@@ -415,6 +418,7 @@ class ComponentCascadeDot {
415
418
if ( stack > ( this . dimensional_data . length - 1 ) ) return ;
416
419
let currentStackDocuments = this . STACKS [ stack ] . childNodes ;
417
420
let children = [ ] ;
421
+ let to_first_index = null ;
418
422
currentStackDocuments . forEach ( ( D , index ) => {
419
423
if ( nodes === null ) {
420
424
D . classList . add ( 'dlp-label-silence' ) ;
@@ -428,10 +432,12 @@ class ComponentCascadeDot {
428
432
if ( children . indexOf ( child ) === - 1 ) children . push ( c ) ;
429
433
} ) ;
430
434
}
435
+ if ( to_first_index === null ) to_first_index = index ;
431
436
} else {
432
437
D . classList . add ( 'dlp-label-silence' ) ;
433
438
}
434
439
} ) ;
440
+ if ( to_first_index !== null ) this . STACKS [ stack ] . scrollTop = to_first_index * 28 ;
435
441
this . selectToChildren ( stack + 1 , children ) ;
436
442
}
437
443
0 commit comments