Bug 1438755 - Part 3: Use timeScale object in latest props. r?gl
MozReview-Commit-ID: FPXyOsIfOr7
--- a/devtools/client/inspector/animation/components/graph/SummaryGraphPath.js
+++ b/devtools/client/inspector/animation/components/graph/SummaryGraphPath.js
@@ -40,22 +40,22 @@ class SummaryGraphPath extends PureCompo
isStateUpdating: false,
// List of keyframe which consists by only offset and easing.
keyframesList: [],
};
}
componentDidMount() {
// No need to set isStateUpdating state since paint sequence is finish here.
- this.updateState(this.props.animation);
+ this.updateState(this.props);
}
componentWillReceiveProps(nextProps) {
this.setState({ isStateUpdating: true });
- this.updateState(nextProps.animation);
+ this.updateState(nextProps);
}
shouldComponentUpdate(nextProps, nextState) {
return !nextState.isStateUpdating;
}
/**
* Return animatable keyframes list which has only offset and easing.
@@ -145,22 +145,23 @@ class SummaryGraphPath extends PureCompo
keyframe1.easing !== keyframe2.easing) {
return false;
}
}
return true;
}
- async updateState(animation) {
+ async updateState(props) {
const {
+ animation,
emitEventForTest,
getAnimatedPropertyMap,
timeScale,
- } = this.props;
+ } = props;
let animatedPropertyMap = null;
try {
animatedPropertyMap = await getAnimatedPropertyMap(animation);
} catch (e) {
// Expected if we've already been destroyed or other node have been selected
// in the meantime.