mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
Revert "Merge branch 'master' of https://github.com/driftyco/ionic"
This reverts commit 8945bf906d68d469e4653a9db2f564bc588eb0d6, reversing changes made to f4fac225fa3a9151565a1e3c3ccb334405b6a57f.
This commit is contained in:
@ -364,12 +364,11 @@ export class Range implements AfterViewInit, ControlValueAccessor, OnDestroy {
|
||||
this._renderer.setElementStyle(this._bar.nativeElement, 'right', barR);
|
||||
|
||||
// add touchstart/mousedown listeners
|
||||
this._events.pointerEvents({
|
||||
elementRef: this._slider,
|
||||
pointerDown: this.pointerDown.bind(this),
|
||||
pointerMove: this.pointerMove.bind(this),
|
||||
pointerUp: this.pointerUp.bind(this)
|
||||
});
|
||||
this._events.pointerEventsRef(this._slider,
|
||||
this.pointerDown.bind(this),
|
||||
this.pointerMove.bind(this),
|
||||
this.pointerUp.bind(this));
|
||||
|
||||
this.createTicks();
|
||||
}
|
||||
|
||||
@ -431,12 +430,18 @@ export class Range implements AfterViewInit, ControlValueAccessor, OnDestroy {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
||||
// update the ratio for the active knob
|
||||
this.updateKnob(pointerCoord(ev), this._rect);
|
||||
if (this._start !== null && this._active !== null) {
|
||||
// only use pointer move if it's a valid pointer
|
||||
// and we already have start coordinates
|
||||
|
||||
// update the active knob's position
|
||||
this._active.position();
|
||||
this._pressed = this._active.pressed = true;
|
||||
// update the ratio for the active knob
|
||||
this.updateKnob(pointerCoord(ev), this._rect);
|
||||
|
||||
// update the active knob's position
|
||||
this._active.position();
|
||||
this._pressed = this._active.pressed = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user