mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 02:31:34 +08:00
fix(picker): tune scrolling speed
This commit is contained in:
@ -262,7 +262,7 @@ export class PickerColumnCmp {
|
||||
return;
|
||||
}
|
||||
|
||||
this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 17, MAX_PICKER_SPEED);
|
||||
this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
|
||||
if (this.velocity === 0 && detail.deltaY === 0) {
|
||||
const opt = (detail.event.target as Element).closest('.picker-opt');
|
||||
if (opt && opt.hasAttribute('opt-index')) {
|
||||
@ -341,4 +341,4 @@ export class PickerColumnCmp {
|
||||
|
||||
const PICKER_OPT_SELECTED = 'picker-opt-selected';
|
||||
const DECELERATION_FRICTION = 0.97;
|
||||
const MAX_PICKER_SPEED = 60;
|
||||
const MAX_PICKER_SPEED = 90;
|
||||
|
Reference in New Issue
Block a user