@@ -46,8 +46,7 @@ export function showMemoryLayout(data): void {
46
46
container . appendChild ( table ) ;
47
47
const rows = [ ] ;
48
48
49
- // eslint-disable-next-line camelcase
50
- function node_t ( idx , depth , offset ) {
49
+ function nodeT ( idx , depth , offset ) {
51
50
if ( ! rows [ depth ] ) {
52
51
rows [ depth ] = { el : document . createElement ( "tr" ) , offset : 0 } ;
53
52
}
@@ -92,25 +91,23 @@ export function showMemoryLayout(data): void {
92
91
tooltip . style . display = "block" ;
93
92
} ) ;
94
93
td . addEventListener ( "mouseleave" , ( _ ) => ( tooltip . style . display = "none" ) ) ;
95
- // eslint-disable-next-line camelcase
96
- const total_offset = rows [ depth ] . offset ;
94
+
95
+ const totalOffset = rows [ depth ] . offset ;
97
96
td . addEventListener ( "dblclick" , ( e ) => {
98
97
const node = data . nodes [ idx ] ;
99
98
zoom = data . nodes [ 0 ] . size / node . size ;
100
- // eslint-disable-next-line camelcase
101
- y = ( - total_offset / data . nodes [ 0 ] . size ) * zoom ;
99
+ y = ( - totalOffset / data . nodes [ 0 ] . size ) * zoom ;
102
100
x = 0 ;
103
101
locate ( ) ;
104
102
} ) ;
105
103
106
104
rows [ depth ] . el . appendChild ( td ) ;
107
105
rows [ depth ] . offset += data . nodes [ idx ] . size ;
108
106
109
- // eslint-disable-next-line eqeqeq
110
- if ( data . nodes [ idx ] . childrenStart != - 1 ) {
107
+ if ( data . nodes [ idx ] . childrenStart !== - 1 ) {
111
108
for ( let i = 0 ; i < data . nodes [ idx ] . childrenLen ; i ++ ) {
112
109
if ( data . nodes [ data . nodes [ idx ] . childrenStart + i ] . size ) {
113
- node_t (
110
+ nodeT (
114
111
data . nodes [ idx ] . childrenStart + i ,
115
112
depth + 1 ,
116
113
offset + data . nodes [ data . nodes [ idx ] . childrenStart + i ] . offset
@@ -120,7 +117,7 @@ export function showMemoryLayout(data): void {
120
117
}
121
118
}
122
119
123
- node_t ( 0 , 0 , 0 ) ;
120
+ nodeT ( 0 , 0 , 0 ) ;
124
121
125
122
for ( const row of rows ) table . appendChild ( row . el ) ;
126
123
0 commit comments