mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 13:01:01 +08:00
chore(animations): using named functions
- rollup generates a better code - better for dev debugging
This commit is contained in:
@ -11,7 +11,7 @@ export class ActionSheetController {
|
|||||||
private actionSheets: ActionSheet[] = [];
|
private actionSheets: ActionSheet[] = [];
|
||||||
|
|
||||||
@Method()
|
@Method()
|
||||||
create(opts?: ActionSheetOptions) {
|
create(opts?: ActionSheetOptions): Promise<ActionSheet> {
|
||||||
// create ionic's wrapping ion-action-sheet component
|
// create ionic's wrapping ion-action-sheet component
|
||||||
const actionSheet = document.createElement('ion-action-sheet');
|
const actionSheet = document.createElement('ion-action-sheet');
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Action Sheet Enter Animation
|
* iOS Action Sheet Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Action Sheet Leave Animation
|
* iOS Action Sheet Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -11,7 +11,7 @@ export class AlertController {
|
|||||||
private alerts: Alert[] = [];
|
private alerts: Alert[] = [];
|
||||||
|
|
||||||
@Method()
|
@Method()
|
||||||
create(opts?: AlertOptions) {
|
create(opts?: AlertOptions): Promise<Alert> {
|
||||||
// create ionic's wrapping ion-alert component
|
// create ionic's wrapping ion-alert component
|
||||||
const alert = document.createElement('ion-alert');
|
const alert = document.createElement('ion-alert');
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Alert Enter Animation
|
* iOS Alert Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Alert Leave Animation
|
* iOS Alert Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -485,7 +485,6 @@ export class ItemSliding {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<ion-gesture props={{
|
<ion-gesture props={{
|
||||||
'canStart': this.canStart.bind(this),
|
'canStart': this.canStart.bind(this),
|
||||||
'onStart': this.onDragStart.bind(this),
|
'onStart': this.onDragStart.bind(this),
|
||||||
|
@ -11,7 +11,7 @@ export class LoadingController {
|
|||||||
private loadings: Loading[] = [];
|
private loadings: Loading[] = [];
|
||||||
|
|
||||||
@Method()
|
@Method()
|
||||||
create(opts?: LoadingOptions) {
|
create(opts?: LoadingOptions): Promise<Loading> {
|
||||||
// create ionic's wrapping ion-loading component
|
// create ionic's wrapping ion-loading component
|
||||||
const loading = document.createElement('ion-loading');
|
const loading = document.createElement('ion-loading');
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Loading Enter Animation
|
* iOS Loading Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Loading Leave Animation
|
* iOS Loading Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Modal Enter Animation
|
* iOS Modal Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Modal Leave Animation
|
* iOS Modal Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Popover Enter Animation
|
* iOS Popover Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Popover Leave Animation
|
* iOS Popover Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function(Animation: Animation, baseElm: HTMLElement) {
|
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,11 +3,11 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Toast Enter Animation
|
* iOS Toast Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function(
|
export default function iOSEnterAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement,
|
baseElm: HTMLElement,
|
||||||
position: string
|
position: string
|
||||||
) {
|
): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const wrapperAnimation = new Animation();
|
const wrapperAnimation = new Animation();
|
||||||
|
@ -3,11 +3,11 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Toast Leave Animation
|
* iOS Toast Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function(
|
export default function iOSLeaveAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement,
|
baseElm: HTMLElement,
|
||||||
position: string
|
position: string
|
||||||
) {
|
): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const wrapperAnimation = new Animation();
|
const wrapperAnimation = new Animation();
|
||||||
|
Reference in New Issue
Block a user