fix(tapclick): several improvements

- refactors code using UIEventManager
- improved performance by using passive event listeners
- fixes isScrolling()
- click tolerance has been increased to match native behavior
- click is immediately prevented if the content is scrolled.
This commit is contained in:
Manu Mtz.-Almeida
2016-10-19 20:23:53 +02:00
parent 272acfc893
commit 35d12efe0b
7 changed files with 154 additions and 149 deletions

View File

@ -190,7 +190,7 @@ export class Content extends Ion {
this._zone.runOutsideAngular(() => {
this._scroll = new ScrollView(this._scrollEle);
this._scLsn = this.addScrollListener(this._app.setScrolling);
this._scLsn = this.addScrollListener(this._app.setScrolling.bind(this._app));
});
}
@ -252,6 +252,9 @@ export class Content extends Ion {
return this._addListener('mousemove', handler);
}
/**
* @private
*/
_addListener(type: string, handler: any): Function {
assert(handler, 'handler must be valid');
assert(this._scrollEle, '_scrollEle must be valid');