1
1
import { select , event } from 'd3-selection' ;
2
2
import { scaleLinear , scaleQuantize } from 'd3-scale' ;
3
3
import { min , max , range } from 'd3-array' ;
4
- import { transition } from 'd3-transition' ;
5
4
import d3Tip from 'd3-tip' ;
6
5
import { partition , hierarchy } from 'd3-hierarchy' ;
7
6
@@ -316,7 +315,7 @@ class FlameGraph {
316
315
} ;
317
316
} ) ( this ) ,
318
317
height : ( function ( _this ) {
319
- return function ( d ) {
318
+ return function ( /* d */ ) {
320
319
return _this . cellHeight ( ) ;
321
320
} ;
322
321
} ) ( this ) ,
@@ -398,7 +397,7 @@ class FlameGraph {
398
397
targetLabels . data ( data , d => d . data ? d . data . location : d . location )
399
398
. attr ( 'class' , 'label' )
400
399
. style ( 'font-size' , this . fontSize + "em" )
401
- . transition ( ) . attr ( 'dy' , ( this . fontSize / 2 ) + "em" ) . attr ( 'x' , ( function ( _this ) {
400
+ . transition ( ) . attr ( 'dy' , ( this . fontSize / 2 ) + "em" ) . attr ( 'x' , ( function ( ) {
402
401
return function ( d ) {
403
402
return attrs . x ( d ) + 2 ;
404
403
} ;
@@ -448,7 +447,6 @@ class FlameGraph {
448
447
}
449
448
450
449
_renderAncestors ( ) {
451
- let i ;
452
450
let j ;
453
451
let idx ;
454
452
let len ;
@@ -474,8 +472,8 @@ class FlameGraph {
474
472
475
473
// FIXME: this is pretty ugly, but we need to add links between ancestors
476
474
let renderAncestor = {
477
- x : ( function ( _this ) {
478
- return function ( d ) {
475
+ x : ( function ( ) {
476
+ return function ( /* d */ ) {
479
477
return 0 ;
480
478
} ;
481
479
} ) ( this ) ,
@@ -486,7 +484,7 @@ class FlameGraph {
486
484
} ) ( this ) ,
487
485
width : this . width ( ) ,
488
486
height : this . cellHeight ( ) ,
489
- text : ( function ( _this ) {
487
+ text : ( function ( ) {
490
488
return function ( d ) {
491
489
return "↩ " + ( getClassAndMethodName ( d . data ? d . data . name : d . name ) ) ;
492
490
} ;
@@ -514,7 +512,7 @@ class FlameGraph {
514
512
return Math . round ( _this . width ( ) - _this . x ( d . x1 - d . x0 ) ) > 0 && ( ( ref = d . children ) != null ? ref . length : void 0 ) ;
515
513
} ) ) ( this ) ;
516
514
517
- this . container . selectAll ( '.node' ) . classed ( 'clickable' , ( ( _this => d => clickable ( d ) ) ) ( this ) ) . on ( 'click' , ( ( _this => d => {
515
+ this . container . selectAll ( '.node' ) . classed ( 'clickable' , ( ( ( ) => d => clickable ( d ) ) ) ( this ) ) . on ( 'click' , ( ( _this => d => {
518
516
if ( _this . tip ) {
519
517
_this . tip . hide ( ) ;
520
518
}
0 commit comments