feat: add comments

This commit is contained in:
osdnk
2019-06-11 19:58:36 +02:00
parent 9b99822a3e
commit 6484394dd7

View File

@@ -305,6 +305,7 @@ export default class Card extends React.Component<Props> {
)
),
// Stop animations while we're dragging
// and invoke proper listener
cond(
clockRunning(this.clock),
call([this.toValue], ([target]) => {
@@ -379,6 +380,9 @@ export default class Card extends React.Component<Props> {
]);
componentWillUnmount(): void {
// It might sometimes happen than animation will be unmounted
// during running. However, we need to invoke listener onClose
// manually in this case
if (this.isRunningAnimation) {
this.props.onClose(false);
}