refactor(all): consistent gesture events

This commit is contained in:
Manu Mtz.-Almeida
2018-08-26 01:26:36 +02:00
parent c1c51025f3
commit 7917ba96ef
7 changed files with 50 additions and 48 deletions

View File

@ -183,9 +183,9 @@ export class Menu implements MenuI {
threshold: 10,
canStart: this.canStart.bind(this),
onWillStart: this.onWillStart.bind(this),
onStart: this.onDragStart.bind(this),
onMove: this.onDragMove.bind(this),
onEnd: this.onDragEnd.bind(this),
onStart: this.onStart.bind(this),
onMove: this.onMove.bind(this),
onEnd: this.onEnd.bind(this),
});
// mask it as enabled / disabled
@ -329,7 +329,7 @@ export class Menu implements MenuI {
return this.loadAnimation();
}
private onDragStart() {
private onStart() {
if (!this.isAnimating || !this.animation) {
assert(false, 'isAnimating has to be true');
return;
@ -339,7 +339,7 @@ export class Menu implements MenuI {
this.animation.reverse(this._isOpen).progressStart();
}
private onDragMove(detail: GestureDetail) {
private onMove(detail: GestureDetail) {
if (!this.isAnimating || !this.animation) {
assert(false, 'isAnimating has to be true');
return;
@ -350,7 +350,7 @@ export class Menu implements MenuI {
this.animation.progressStep(stepValue);
}
private onDragEnd(detail: GestureDetail) {
private onEnd(detail: GestureDetail) {
if (!this.isAnimating || !this.animation) {
assert(false, 'isAnimating has to be true');
return;