mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge pull request #614 from NathanaelA/fix_mispelling_gestures_detach
Fix the 9 misspellings of _detach in the two Gestures files.
This commit is contained in:
@@ -28,7 +28,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
};
|
};
|
||||||
this._onTargetUnloaded = args => {
|
this._onTargetUnloaded = args => {
|
||||||
trace.write(this.target + ".target unloaded. android:" + this.target._nativeView, "gestures");
|
trace.write(this.target + ".target unloaded. android:" + this.target._nativeView, "gestures");
|
||||||
this._dettach();
|
this._detach();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.target.on(view.View.loadedEvent, this._onTargetLoaded);
|
this.target.on(view.View.loadedEvent, this._onTargetLoaded);
|
||||||
@@ -41,7 +41,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public disconnect() {
|
public disconnect() {
|
||||||
this._dettach();
|
this._detach();
|
||||||
|
|
||||||
if (this.target) {
|
if (this.target) {
|
||||||
this.target.off(view.View.loadedEvent, this._onTargetLoaded);
|
this.target.off(view.View.loadedEvent, this._onTargetLoaded);
|
||||||
@@ -54,7 +54,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
super.disconnect();
|
super.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
private _dettach() {
|
private _detach() {
|
||||||
trace.write(this.target + "._detach() android:" + this.target._nativeView, "gestures");
|
trace.write(this.target + "._detach() android:" + this.target._nativeView, "gestures");
|
||||||
|
|
||||||
this._onTouchListener = null;
|
this._onTouchListener = null;
|
||||||
@@ -66,7 +66,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
|
|
||||||
private _attach(target: view.View, type: definition.GestureTypes) {
|
private _attach(target: view.View, type: definition.GestureTypes) {
|
||||||
trace.write(this.target + "._attach() android:" + this.target._nativeView, "gestures");
|
trace.write(this.target + "._attach() android:" + this.target._nativeView, "gestures");
|
||||||
this._dettach();
|
this._detach();
|
||||||
|
|
||||||
if (type & definition.GestureTypes.tap || type & definition.GestureTypes.doubleTap || type & definition.GestureTypes.longPress) {
|
if (type & definition.GestureTypes.tap || type & definition.GestureTypes.doubleTap || type & definition.GestureTypes.longPress) {
|
||||||
this._simpleGestureDetector = new android.support.v4.view.GestureDetectorCompat(target._context, new TapAndDoubleTapGestureListener(this, this.target, type));
|
this._simpleGestureDetector = new android.support.v4.view.GestureDetectorCompat(target._context, new TapAndDoubleTapGestureListener(this, this.target, type));
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
};
|
};
|
||||||
this._onTargetUnloaded = args => {
|
this._onTargetUnloaded = args => {
|
||||||
trace.write(this.target + ".target unloaded. _nativeView:" + this.target._nativeView, "gestures");
|
trace.write(this.target + ".target unloaded. _nativeView:" + this.target._nativeView, "gestures");
|
||||||
this._dettach();
|
this._detach();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.target.on(view.View.loadedEvent, this._onTargetLoaded);
|
this.target.on(view.View.loadedEvent, this._onTargetLoaded);
|
||||||
@@ -87,7 +87,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
|
|
||||||
private _attach(target: view.View, type: definition.GestureTypes) {
|
private _attach(target: view.View, type: definition.GestureTypes) {
|
||||||
trace.write(target + "._attach() _nativeView:" + target._nativeView, "gestures");
|
trace.write(target + "._attach() _nativeView:" + target._nativeView, "gestures");
|
||||||
this._dettach();
|
this._detach();
|
||||||
|
|
||||||
if (target && target._nativeView && target._nativeView.addGestureRecognizer) {
|
if (target && target._nativeView && target._nativeView.addGestureRecognizer) {
|
||||||
var nativeView = <UIView>target._nativeView;
|
var nativeView = <UIView>target._nativeView;
|
||||||
@@ -145,8 +145,8 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _dettach() {
|
private _detach() {
|
||||||
trace.write(this.target + "._dettach() _nativeView:" + this.target._nativeView, "gestures");
|
trace.write(this.target + "._detach() _nativeView:" + this.target._nativeView, "gestures");
|
||||||
if (this.target && this.target._nativeView) {
|
if (this.target && this.target._nativeView) {
|
||||||
for (var name in this._recognizers) {
|
for (var name in this._recognizers) {
|
||||||
if (this._recognizers.hasOwnProperty(name)) {
|
if (this._recognizers.hasOwnProperty(name)) {
|
||||||
@@ -162,7 +162,7 @@ export class GesturesObserver extends common.GesturesObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public disconnect() {
|
public disconnect() {
|
||||||
this._dettach();
|
this._detach();
|
||||||
|
|
||||||
if (this.target) {
|
if (this.target) {
|
||||||
this.target.off(view.View.loadedEvent, this._onTargetLoaded);
|
this.target.off(view.View.loadedEvent, this._onTargetLoaded);
|
||||||
|
|||||||
Reference in New Issue
Block a user