File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,9 @@ export default class Node extends React.Component {
29
29
this . applyTransform ( transform ) ;
30
30
}
31
31
32
- componentWillReceiveProps ( nextProps ) {
33
- if ( nextProps . nodeData . x !== this . props . nodeData . x ||
34
- nextProps . nodeData . y !== this . props . nodeData . y ) {
35
- const transform = this . setTransformOrientation ( nextProps . nodeData . x , nextProps . nodeData . y ) ;
36
- this . applyTransform ( transform ) ;
37
- }
32
+ componentWillUpdate ( nextProps ) {
33
+ const transform = this . setTransformOrientation ( nextProps . nodeData . x , nextProps . nodeData . y ) ;
34
+ this . applyTransform ( transform ) ;
38
35
}
39
36
40
37
setTransformOrientation ( x , y ) {
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ describe('<Node />', () => {
170
170
} ) ;
171
171
172
172
173
- it ( 'updates its transform attribute if either the `x` or `y` prop changes' , ( ) => {
173
+ it ( 'applies updated transform if either the `x` or `y` prop changes' , ( ) => {
174
174
// jest.spyOn(Node.prototype, 'applyTransform');
175
175
const updatedProps = {
176
176
...mockProps ,
You can’t perform that action at this time.
0 commit comments