mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 17:23:18 +08:00
feat: add comments
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user