mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(): fix activator typescript errors
This commit is contained in:
@ -2,24 +2,23 @@ import {raf, rafFrames} from '../../util/dom';
|
||||
|
||||
|
||||
export class Activator {
|
||||
public activatedClass: any;
|
||||
public queue: Array<any> = [];
|
||||
public active: Array<any> = [];
|
||||
public x: number = 0;
|
||||
public y: number = 0;
|
||||
|
||||
constructor(app, config, zone) {
|
||||
this.app = app;
|
||||
this.zone = zone;
|
||||
this.queue = [];
|
||||
this.active = [];
|
||||
this.clearStateDefers = 5;
|
||||
this.clearAttempt = 0;
|
||||
constructor(public app, config, public zone) {
|
||||
this.activatedClass = config.get('activatedClass') || 'activated';
|
||||
this.x = 0;
|
||||
this.y = 0;
|
||||
}
|
||||
|
||||
downAction(ev, activatableEle, pointerX, pointerY, callback) {
|
||||
downAction(ev, activatableEle, pointerX, pointerY) {
|
||||
// the user just pressed down
|
||||
|
||||
let self = this;
|
||||
if (self.disableActivated(ev)) return false;
|
||||
if (self.disableActivated(ev)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// remember where they pressed
|
||||
self.x = pointerX;
|
||||
@ -54,7 +53,7 @@ export class Activator {
|
||||
self.clearState();
|
||||
}
|
||||
this.zone.runOutsideAngular(() => {
|
||||
rafFrames(self.clearStateDefers, activateUp);
|
||||
rafFrames(CLEAR_STATE_DEFERS, activateUp);
|
||||
});
|
||||
}
|
||||
|
||||
@ -103,3 +102,5 @@ export class Activator {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const CLEAR_STATE_DEFERS = 5;
|
||||
|
@ -4,13 +4,12 @@ import {raf, rafFrames} from '../../util/dom';
|
||||
|
||||
|
||||
export class RippleActivator extends Activator {
|
||||
private expands: any = {};
|
||||
private fades: any = {};
|
||||
private expandSpeed: number;
|
||||
|
||||
constructor(app, config, zone) {
|
||||
super(app, config, zone);
|
||||
|
||||
this.expands = {};
|
||||
this.fades = {};
|
||||
this.expandSpeed = null;
|
||||
}
|
||||
|
||||
downAction(ev, activatableEle, pointerX, pointerY) {
|
||||
@ -28,6 +27,7 @@ export class RippleActivator extends Activator {
|
||||
});
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
createRipple(activatableEle, pointerX, pointerY, clientRect) {
|
||||
|
Reference in New Issue
Block a user