mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
refactor(picker): add the bouncy bounce
This commit is contained in:
@ -28,7 +28,6 @@ export class PickerColumnCmp {
|
|||||||
private y: number = 0;
|
private y: number = 0;
|
||||||
|
|
||||||
private activeBlock: string;
|
private activeBlock: string;
|
||||||
// private decelerateFunc: Function;
|
|
||||||
|
|
||||||
@Element() el: HTMLElement;
|
@Element() el: HTMLElement;
|
||||||
|
|
||||||
@ -45,7 +44,6 @@ export class PickerColumnCmp {
|
|||||||
|
|
||||||
this.rotateFactor = pickerRotateFactor;
|
this.rotateFactor = pickerRotateFactor;
|
||||||
this.scaleFactor = pickerScaleFactor;
|
this.scaleFactor = pickerScaleFactor;
|
||||||
// this.decelerateFunc = this.decelerate.bind(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ionViewDidLoad() {
|
protected ionViewDidLoad() {
|
||||||
@ -224,11 +222,10 @@ export class PickerColumnCmp {
|
|||||||
|
|
||||||
this.update(y, 0, true, !notLockedIn);
|
this.update(y, 0, true, !notLockedIn);
|
||||||
|
|
||||||
// TODO
|
if (notLockedIn) {
|
||||||
// if (notLockedIn) {
|
// isn't locked in yet, keep decelerating until it is
|
||||||
// // isn't locked in yet, keep decelerating until it is
|
Context.dom.raf(() => this.decelerate());
|
||||||
// this.rafId = this._plt.raf(this.decelerateFunc);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
} else if (this.y % this.optHeight !== 0) {
|
} else if (this.y % this.optHeight !== 0) {
|
||||||
// needs to still get locked into a position so options line up
|
// needs to still get locked into a position so options line up
|
||||||
|
|||||||
Reference in New Issue
Block a user