File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,8 @@ class ComponentCascadeDot {
359
359
let parentNode = nodes [ stack - 1 ] ;
360
360
let currentStackDocuments = this . STACKS [ stack ] . childNodes ;
361
361
currentStackDocuments . forEach ( ( D , index ) => {
362
- let parents = this . dimensional_data [ stack ] [ index ] . parentNodes ;
362
+ let data = this . dimensional_data [ stack ] [ index ] ;
363
+ let parents = data . parentNodes ;
363
364
if ( checked === true || checked === undefined ) {
364
365
let D = currentStackDocuments [ index ] ;
365
366
if ( parents . length > 0 && ( parents [ stack - 1 ] !== parentNode ) ) {
@@ -370,11 +371,24 @@ class ComponentCascadeDot {
370
371
D . classList . remove ( 'dlp-label-silence' ) ;
371
372
}
372
373
}
373
- if ( checked === true && node === parseInt ( D . getAttribute ( 'data-id' ) ) && ! ( D . querySelector ( 'i' ) instanceof HTMLElement ) ) {
374
+ if ( checked === true && node === data . key && data . mark !== true ) {
375
+ data . mark = true ;
374
376
D . insertAdjacentHTML ( 'beforeend' , `<i>${ _componentSvg . check_circle } </i>` ) ;
375
377
}
376
- if ( checked === false ) {
378
+ if ( checked === false && node === data . key ) {
377
379
let nodes = this . dimensional_data [ stack ] [ index ] . nodes ;
380
+ let cancel = true ;
381
+ for ( let x in this . dimensional_data [ stack + 1 ] ) {
382
+ let d = this . dimensional_data [ stack + 1 ] [ x ] ;
383
+ if ( nodes . indexOf ( d . key ) !== - 1 && ( d . checked === true || d . mark === true ) ) {
384
+ cancel = false ;
385
+ break ;
386
+ }
387
+ }
388
+ if ( cancel && ( D . querySelector ( 'i' ) instanceof HTMLElement ) ) {
389
+ data . mark = false ;
390
+ D . querySelector ( 'i' ) . remove ( ) ;
391
+ }
378
392
}
379
393
} ) ;
380
394
if ( nodes . length > 0 ) {
You can’t perform that action at this time.
0 commit comments