Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 988b99a

Browse files
神漠cxfeng1
authored andcommitted
[WEEX-541][iOS]Vertical Pan may not trigger 'start' event on some devices.
1 parent bb466be commit 988b99a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ - (void)onPan:(UIPanGestureRecognizer *)gesture
632632
[self fireEvent:@"horizontalpan" params:@{@"state":state, @"changedTouches":resultTouch ? @[resultTouch] : @[]}];
633633
}
634634

635-
if (_listenVerticalPan && (gesture.state != UIGestureRecognizerStateBegan || fabs(translation.y) > fabs(translation.x))) {
635+
if (_listenVerticalPan && (gesture.state != UIGestureRecognizerStateBegan || fabs(translation.y) >= fabs(translation.x))) {
636636
[self fireEvent:@"verticalpan" params:@{@"state":state, @"changedTouches":resultTouch ? @[resultTouch] : @[]}];
637637
}
638638

0 commit comments

Comments
 (0)