@@ -1789,12 +1789,19 @@ window.ComponentCascadeLine = class {
1789
1789
node_data . key = aim_node_data . key ;
1790
1790
node_data . val = aim_node_data . val ;
1791
1791
let index = node_data . nodes . indexOf ( aim_node_data . key ) ;
1792
- node_data . nodes . splice ( index , 1 , tmp_key ) ;
1792
+ if ( index !== - 1 ) node_data . nodes . splice ( index , 1 , tmp_key ) ;
1793
1793
1794
- index = aim_node_data . parentNodes . indexOf ( tmp_key ) ;
1795
- aim_node_data . parentNodes . splice ( index , 1 , aim_node_data . key ) ;
1796
1794
aim_node_data . key = tmp_key ;
1797
1795
aim_node_data . val = tmp_val ;
1796
+ let aimParentNode = aim_node_data . parentNodes . slice ( 0 ) . pop ( ) ;
1797
+ for ( let index in this . dimensional_data [ aim_node_data . stack - 1 ] ) {
1798
+ if ( ! this . dimensional_data [ aim_node_data . stack - 1 ] . hasOwnProperty ( index ) ) continue ;
1799
+ let d = this . dimensional_data [ aim_node_data . stack - 1 ] [ index ] ;
1800
+ if ( d . key === aimParentNode ) {
1801
+ d . nodes . splice ( d . nodes . indexOf ( node_data . key ) , 1 , aim_node_data . key ) ;
1802
+ break ;
1803
+ }
1804
+ }
1798
1805
this . resetChildrenParent ( node_data ) ;
1799
1806
1800
1807
node . querySelector ( 'span' ) . textContent = node_data . val ;
@@ -1814,6 +1821,7 @@ window.ComponentCascadeLine = class {
1814
1821
this . dimensional_data [ stack ] . forEach ( ( d ) => {
1815
1822
if ( nodes . indexOf ( d . key ) !== - 1 ) {
1816
1823
d . parentNodes = parents ;
1824
+ console . log ( d )
1817
1825
if ( Array . isArray ( d . nodes ) && d . nodes . length > 0 ) {
1818
1826
this . resetChildrenParent ( d ) ;
1819
1827
}
0 commit comments