mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(animation): update animation API (#19529)
This commit is contained in:
@ -10,11 +10,11 @@ export const iosEnterAnimation = (baseEl: HTMLElement): IonicAnimation => {
|
||||
const wrapperAnimation = createAnimation();
|
||||
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', 0.01, 0.4);
|
||||
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper')!)
|
||||
.fromTo('transform', 'translateY(100%)', 'translateY(0%)');
|
||||
|
||||
return baseAnimation
|
||||
|
||||
@ -10,11 +10,11 @@ export const iosLeaveAnimation = (baseEl: HTMLElement): IonicAnimation => {
|
||||
const wrapperAnimation = createAnimation();
|
||||
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', 0.4, 0);
|
||||
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper')!)
|
||||
.fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
||||
|
||||
return baseAnimation
|
||||
|
||||
@ -10,11 +10,11 @@ export const mdEnterAnimation = (baseEl: HTMLElement): IonicAnimation => {
|
||||
const wrapperAnimation = createAnimation();
|
||||
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', 0.01, 0.32);
|
||||
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper')!)
|
||||
.fromTo('transform', 'translateY(100%)', 'translateY(0%)');
|
||||
|
||||
return baseAnimation
|
||||
|
||||
@ -10,11 +10,11 @@ export const mdLeaveAnimation = (baseEl: HTMLElement): IonicAnimation => {
|
||||
const wrapperAnimation = createAnimation();
|
||||
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', 0.32, 0);
|
||||
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
||||
.addElement(baseEl.querySelector('.action-sheet-wrapper')!)
|
||||
.fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
||||
|
||||
return baseAnimation
|
||||
|
||||
Reference in New Issue
Block a user