mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +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.3);
|
||||
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-wrapper'))
|
||||
.addElement(baseEl.querySelector('.loading-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.01, transform: 'scale(1.1)' },
|
||||
{ offset: 1, opacity: 1, transform: 'scale(1)' }
|
||||
|
||||
@ -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.3, 0);
|
||||
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-wrapper'))
|
||||
.addElement(baseEl.querySelector('.loading-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.99, transform: 'scale(1)' },
|
||||
{ offset: 1, opacity: 0, transform: 'scale(0.9)' }
|
||||
|
||||
@ -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('.loading-wrapper'))
|
||||
.addElement(baseEl.querySelector('.loading-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.01, transform: 'scale(1.1)' },
|
||||
{ offset: 1, opacity: 1, transform: 'scale(1)' }
|
||||
|
||||
@ -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('.loading-wrapper'))
|
||||
.addElement(baseEl.querySelector('.loading-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.99, transform: 'scale(1)' },
|
||||
{ offset: 1, opacity: 0, transform: 'scale(0.9)' }
|
||||
|
||||
Reference in New Issue
Block a user