mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
[react-native] Fix spelling of "cancelled"
Summary: Apparently British spelling is "cancelled", American is "canceled"? Picking "cancelled" for consistency with UIKit. @public Test Plan: landcastle
This commit is contained in:
committed by
Christopher Chedeau
parent
5e160f168d
commit
f8b36491d7
@@ -199,7 +199,7 @@ RCT_IMPORT_METHOD(RCTEventEmitter, receiveTouches);
|
||||
|
||||
#pragma mark - Gesture Recognizer Delegate Callbacks
|
||||
|
||||
static BOOL RCTAllTouchesAreCancelldOrEnded(NSSet *touches)
|
||||
static BOOL RCTAllTouchesAreCancelledOrEnded(NSSet *touches)
|
||||
{
|
||||
for (UITouch *touch in touches) {
|
||||
if (touch.phase == UITouchPhaseBegan ||
|
||||
@@ -254,7 +254,7 @@ static BOOL RCTAnyTouchesChanged(NSSet *touches)
|
||||
[self _updateAndDispatchTouches:touches eventName:@"topTouchEnd" originatingTime:event.timestamp];
|
||||
[self _recordRemovedTouches:touches];
|
||||
|
||||
if (RCTAllTouchesAreCancelldOrEnded(event.allTouches)) {
|
||||
if (RCTAllTouchesAreCancelledOrEnded(event.allTouches)) {
|
||||
self.state = UIGestureRecognizerStateEnded;
|
||||
} else if (RCTAnyTouchesChanged(event.allTouches)) {
|
||||
self.state = UIGestureRecognizerStateChanged;
|
||||
@@ -267,7 +267,7 @@ static BOOL RCTAnyTouchesChanged(NSSet *touches)
|
||||
[self _updateAndDispatchTouches:touches eventName:@"topTouchCancel" originatingTime:event.timestamp];
|
||||
[self _recordRemovedTouches:touches];
|
||||
|
||||
if (RCTAllTouchesAreCancelldOrEnded(event.allTouches)) {
|
||||
if (RCTAllTouchesAreCancelledOrEnded(event.allTouches)) {
|
||||
self.state = UIGestureRecognizerStateCancelled;
|
||||
} else if (RCTAnyTouchesChanged(event.allTouches)) {
|
||||
self.state = UIGestureRecognizerStateChanged;
|
||||
|
||||
Reference in New Issue
Block a user