File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default class Tree extends React.Component {
23
23
24
24
25
25
componentDidMount ( ) {
26
- this . bindZoomListener ( ) ;
26
+ this . bindZoomListener ( this . props ) ;
27
27
// TODO find better way of setting initialDepth, re-render here is suboptimal
28
28
this . setState ( { initialRender : false } ) ; // eslint-disable-line
29
29
}
@@ -41,7 +41,7 @@ export default class Tree extends React.Component {
41
41
if ( this . props . translate !== nextProps . translate ||
42
42
this . props . scaleExtent !== nextProps . scaleExtent ) {
43
43
console . log ( nextProps . translate , nextProps . scaleExtent ) ;
44
- this . bindZoomListener ( ) ;
44
+ this . bindZoomListener ( nextProps ) ;
45
45
}
46
46
}
47
47
@@ -68,8 +68,8 @@ export default class Tree extends React.Component {
68
68
*
69
69
* @return {void }
70
70
*/
71
- bindZoomListener ( ) {
72
- const { zoomable, scaleExtent, translate } = this . props ;
71
+ bindZoomListener ( props ) {
72
+ const { zoomable, scaleExtent, translate } = props ;
73
73
const svg = select ( '.rd3t-svg' ) ;
74
74
const g = select ( '.rd3t-g' ) ;
75
75
You can’t perform that action at this time.
0 commit comments