mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Replace knownEvents modules with static strings.
This commit is contained in:
@@ -44,8 +44,8 @@ export class GesturesObserver implements definition.GesturesObserver {
|
||||
this._dettach();
|
||||
};
|
||||
|
||||
target.on(view.knownEvents.loaded, this._onTargetLoaded);
|
||||
target.on(view.knownEvents.unloaded, this._onTargetUnloaded);
|
||||
target.on(view.View.loadedEvent, this._onTargetLoaded);
|
||||
target.on(view.View.unloadedEvent, this._onTargetUnloaded);
|
||||
|
||||
if (target.isLoaded) {
|
||||
this._attach(target, type);
|
||||
@@ -57,8 +57,8 @@ export class GesturesObserver implements definition.GesturesObserver {
|
||||
this._dettach();
|
||||
|
||||
if (this._target) {
|
||||
this._target.off(view.knownEvents.loaded, this._onTargetLoaded);
|
||||
this._target.off(view.knownEvents.unloaded, this._onTargetUnloaded);
|
||||
this._target.off(view.View.loadedEvent, this._onTargetLoaded);
|
||||
this._target.off(view.View.unloadedEvent, this._onTargetUnloaded);
|
||||
|
||||
this._onTargetLoaded = null;
|
||||
this._onTargetUnloaded = null;
|
||||
|
||||
@@ -74,8 +74,8 @@ export class GesturesObserver implements definition.GesturesObserver {
|
||||
this._dettach();
|
||||
};
|
||||
|
||||
target.on(view.knownEvents.loaded, this._onTargetLoaded);
|
||||
target.on(view.knownEvents.unloaded, this._onTargetUnloaded);
|
||||
target.on(view.View.loadedEvent, this._onTargetLoaded);
|
||||
target.on(view.View.unloadedEvent, this._onTargetUnloaded);
|
||||
|
||||
if (target.isLoaded) {
|
||||
this._attach(target, type);
|
||||
@@ -164,8 +164,8 @@ export class GesturesObserver implements definition.GesturesObserver {
|
||||
this._dettach();
|
||||
|
||||
if (this._target) {
|
||||
this._target.off(view.knownEvents.loaded, this._onTargetLoaded);
|
||||
this._target.off(view.knownEvents.unloaded, this._onTargetUnloaded);
|
||||
this._target.off(view.View.loadedEvent, this._onTargetLoaded);
|
||||
this._target.off(view.View.unloadedEvent, this._onTargetUnloaded);
|
||||
|
||||
this._onTargetLoaded = null;
|
||||
this._onTargetUnloaded = null;
|
||||
|
||||
Reference in New Issue
Block a user