mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
chore(): sync with master
This commit is contained in:
@ -320,6 +320,7 @@ export class Refresher implements ComponentInterface {
|
||||
canStart: () => this.state !== RefresherState.Refreshing && this.state !== RefresherState.Completing && this.scrollEl!.scrollTop === 0,
|
||||
onStart: (ev: GestureDetail) => {
|
||||
ev.data = { animation: undefined, didStart: false, cancelled: false };
|
||||
this.state = RefresherState.Pulling;
|
||||
},
|
||||
onMove: (ev: GestureDetail) => {
|
||||
if ((ev.velocityY < 0 && this.progress === 0 && !ev.data.didStart) || ev.data.cancelled) {
|
||||
@ -330,19 +331,14 @@ export class Refresher implements ComponentInterface {
|
||||
if (!ev.data.didStart) {
|
||||
ev.data.didStart = true;
|
||||
|
||||
this.state = RefresherState.Pulling;
|
||||
|
||||
writeTask(() => {
|
||||
const animationType = getRefresherAnimationType(contentEl);
|
||||
const animation = createPullingAnimation(animationType, pullingRefresherIcon);
|
||||
ev.data.animation = animation;
|
||||
writeTask(() => this.scrollEl!.style.setProperty('--overflow', 'hidden'));
|
||||
|
||||
this.scrollEl!.style.setProperty('--overflow', 'hidden');
|
||||
|
||||
animation.progressStart(false, 0);
|
||||
this.ionStart.emit();
|
||||
this.animations.push(animation);
|
||||
});
|
||||
const animationType = getRefresherAnimationType(contentEl);
|
||||
const animation = createPullingAnimation(animationType, pullingRefresherIcon);
|
||||
ev.data.animation = animation;
|
||||
animation.progressStart(false, 0);
|
||||
this.ionStart.emit();
|
||||
this.animations.push(animation);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user