fix(sliding): much better UX + performance

- sliding should behave exactly like a native one
- much better performance

references #7049
references #7116
closes #6913
closes #6958
This commit is contained in:
Manu Mtz.-Almeida
2016-07-03 20:29:38 +02:00
parent b805602ffa
commit d6f62bcb60
9 changed files with 216 additions and 114 deletions

View File

@ -364,11 +364,12 @@ export class Range implements AfterViewInit, ControlValueAccessor, OnDestroy {
this._renderer.setElementStyle(this._bar.nativeElement, 'right', barR);
// add touchstart/mousedown listeners
this._events.pointerEventsRef(this._slider,
this.pointerDown.bind(this),
this.pointerMove.bind(this),
this.pointerUp.bind(this));
this._events.pointerEvents({
elementRef: this._slider,
pointerDown: this.pointerDown.bind(this),
pointerMove: this.pointerMove.bind(this),
pointerUp: this.pointerUp.bind(this)
});
this.createTicks();
}