iOS: fix when doAnimation cause flush
This commit is contained in:
parent
7684eaa896
commit
7bfa542479
@ -566,6 +566,7 @@ - (void)doAnimation:(id)params withPromise:(DoricPromise *)promise {
|
||||
originDelegate.endBlock(callback);
|
||||
}
|
||||
[self transformProperties];
|
||||
[self.view.layer removeAnimationForKey:params[@"id"]];
|
||||
[promise resolve:self.transformation];
|
||||
};
|
||||
it.cancelBlock = ^{
|
||||
@ -582,7 +583,7 @@ - (void)doAnimation:(id)params withPromise:(DoricPromise *)promise {
|
||||
if (params[@"delay"]) {
|
||||
animation.beginTime = CACurrentMediaTime() + [params[@"delay"] floatValue] / 1000;
|
||||
}
|
||||
animation.removedOnCompletion = YES;
|
||||
animation.removedOnCompletion = NO;
|
||||
animation.fillMode = kCAFillModeForwards;
|
||||
if (animation.duration == 0) {
|
||||
animation.duration = FLT_MIN;
|
||||
|
Reference in New Issue
Block a user