perf(all): minify better by using arrow functions (#18730)

This commit is contained in:
Manu MA
2019-07-10 16:33:33 +02:00
committed by Brandy Carney
parent 8beeff2c52
commit 03c1d19e07
99 changed files with 653 additions and 679 deletions

View File

@ -3,7 +3,7 @@ import { Animation } from '../../../interface';
/**
* iOS Loading Enter Animation
*/
export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
export const iosEnterAnimation = (AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> => {
const baseAnimation = new AnimationC();
const backdropAnimation = new AnimationC();
@ -15,7 +15,7 @@ export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): P
backdropAnimation.fromTo('opacity', 0.01, 0.3);
wrapperAnimation.fromTo('opacity', 0.01, 1)
.fromTo('scale', 1.1, 1);
.fromTo('scale', 1.1, 1);
return Promise.resolve(baseAnimation
.addElement(baseEl)
@ -23,4 +23,4 @@ export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): P
.duration(200)
.add(backdropAnimation)
.add(wrapperAnimation));
}
};

View File

@ -3,7 +3,7 @@ import { Animation } from '../../../interface';
/**
* iOS Loading Leave Animation
*/
export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
export const iosLeaveAnimation = (AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> => {
const baseAnimation = new AnimationC();
const backdropAnimation = new AnimationC();
@ -15,7 +15,7 @@ export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): P
backdropAnimation.fromTo('opacity', 0.3, 0);
wrapperAnimation.fromTo('opacity', 0.99, 0)
.fromTo('scale', 1, 0.9);
.fromTo('scale', 1, 0.9);
return Promise.resolve(baseAnimation
.addElement(baseEl)
@ -23,4 +23,4 @@ export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): P
.duration(200)
.add(backdropAnimation)
.add(wrapperAnimation));
}
};

View File

@ -3,7 +3,7 @@ import { Animation } from '../../../interface';
/**
* Md Loading Enter Animation
*/
export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
export const mdEnterAnimation = (AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> => {
const baseAnimation = new AnimationC();
const backdropAnimation = new AnimationC();
@ -22,4 +22,4 @@ export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
.duration(200)
.add(backdropAnimation)
.add(wrapperAnimation));
}
};

View File

@ -3,7 +3,7 @@ import { Animation } from '../../../interface';
/**
* Md Loading Leave Animation
*/
export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
export const mdLeaveAnimation = (AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> => {
const baseAnimation = new AnimationC();
const backdropAnimation = new AnimationC();
@ -22,4 +22,4 @@ export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
.duration(200)
.add(backdropAnimation)
.add(wrapperAnimation));
}
};