mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +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[] = [];
|
||||
|
||||
@Method()
|
||||
create(opts?: ActionSheetOptions) {
|
||||
create(opts?: ActionSheetOptions): Promise<ActionSheet> {
|
||||
// create ionic's wrapping ion-action-sheet component
|
||||
const actionSheet = document.createElement('ion-action-sheet');
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -11,7 +11,7 @@ export class AlertController {
|
||||
private alerts: Alert[] = [];
|
||||
|
||||
@Method()
|
||||
create(opts?: AlertOptions) {
|
||||
create(opts?: AlertOptions): Promise<Alert> {
|
||||
// create ionic's wrapping ion-alert component
|
||||
const alert = document.createElement('ion-alert');
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -485,7 +485,6 @@ export class ItemSliding {
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
<ion-gesture props={{
|
||||
'canStart': this.canStart.bind(this),
|
||||
'onStart': this.onDragStart.bind(this),
|
||||
|
@ -11,7 +11,7 @@ export class LoadingController {
|
||||
private loadings: Loading[] = [];
|
||||
|
||||
@Method()
|
||||
create(opts?: LoadingOptions) {
|
||||
create(opts?: LoadingOptions): Promise<Loading> {
|
||||
// create ionic's wrapping ion-loading component
|
||||
const loading = document.createElement('ion-loading');
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* 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 backdropAnimation = new Animation();
|
||||
|
@ -3,11 +3,11 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* iOS Toast Enter Animation
|
||||
*/
|
||||
export default function(
|
||||
export default function iOSEnterAnimation(
|
||||
Animation: Animation,
|
||||
baseElm: HTMLElement,
|
||||
position: string
|
||||
) {
|
||||
): Animation {
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
|
@ -3,11 +3,11 @@ import { Animation } from '../../../index';
|
||||
/**
|
||||
* iOS Toast Leave Animation
|
||||
*/
|
||||
export default function(
|
||||
export default function iOSLeaveAnimation(
|
||||
Animation: Animation,
|
||||
baseElm: HTMLElement,
|
||||
position: string
|
||||
) {
|
||||
): Animation {
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
|
Reference in New Issue
Block a user