File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ export default class Node extends React.Component {
13
13
14
14
componentDidMount ( ) {
15
15
const { x, y, parent } = this . props . nodeData ;
16
- console . log ( this . props . nodeData ) ;
17
16
const originX = parent ? parent . x : 0 ;
18
17
const originY = parent ? parent . y : 0 ;
19
18
@@ -48,11 +47,13 @@ export default class Node extends React.Component {
48
47
49
48
componentWillLeave ( done ) {
50
49
const { parent } = this . props . nodeData ;
50
+ const originX = parent ? parent . x : 0 ;
51
+ const originY = parent ? parent . y : 0 ;
51
52
52
53
select ( this . node )
53
54
. transition ( )
54
55
. duration ( 500 )
55
- . attr ( 'transform' , this . setTransformOrientation ( parent . x , parent . y ) )
56
+ . attr ( 'transform' , this . setTransformOrientation ( originX , originY ) )
56
57
. each ( 'end' , done ) ;
57
58
}
58
59
You can’t perform that action at this time.
0 commit comments