Skip to content

Commit

Permalink
[WEEX-541][iOS]Vertical Pan may not trigger 'start' event on some dev…
Browse files Browse the repository at this point in the history
…ices.
  • Loading branch information
神漠 authored and cxfeng1 committed Jul 26, 2018
1 parent bb466be commit 988b99a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ - (void)onPan:(UIPanGestureRecognizer *)gesture
[self fireEvent:@"horizontalpan" params:@{@"state":state, @"changedTouches":resultTouch ? @[resultTouch] : @[]}];
}

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

Expand Down

0 comments on commit 988b99a

Please sign in to comment.