mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
fix(animations): fix animation-controller
This commit is contained in:
@ -1,24 +1,15 @@
|
||||
import { Component } from '@stencil/core';
|
||||
import { Animation } from './animation-interface';
|
||||
import { Animator } from './animator';
|
||||
import { Ionic, IonicControllerApi } from '../../index';
|
||||
import { Ionic } from '../../index';
|
||||
|
||||
|
||||
@Component({
|
||||
tag: 'ion-animation-controller'
|
||||
})
|
||||
export class AnimationController implements IonicControllerApi {
|
||||
export class AnimationController {
|
||||
|
||||
ionViewWillLoad() {
|
||||
debugger;;;
|
||||
Ionic.registerController('animation', this);
|
||||
}
|
||||
|
||||
load(): Promise<Animation> {
|
||||
return new Promise(resolve => {
|
||||
debugger;
|
||||
resolve((Animator as any));
|
||||
});
|
||||
Ionic.registerController('animation', Animator);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ export function transitionEnd(elm: HTMLElement, callback: {(ev?: TransitionEvent
|
||||
|
||||
function unregister() {
|
||||
unRegWKTrans && unRegWKTrans();
|
||||
unRegWKTrans && unRegTrans();
|
||||
unRegTrans && unRegTrans();
|
||||
}
|
||||
|
||||
function onTransitionEnd(ev: TransitionEvent) {
|
||||
@ -24,7 +24,7 @@ export function transitionEnd(elm: HTMLElement, callback: {(ev?: TransitionEvent
|
||||
};
|
||||
|
||||
elm.addEventListener('transitionend', onTransitionEnd, opts);
|
||||
unRegWKTrans = function() {
|
||||
unRegTrans = function() {
|
||||
elm.removeEventListener('transitionend', onTransitionEnd, opts);
|
||||
};
|
||||
}
|
||||
|
||||
@ -12,6 +12,9 @@ import iOSLeaveAnimation from './animations/ios.leave';
|
||||
ios: 'modal.ios.scss',
|
||||
md: 'modal.md.scss',
|
||||
wp: 'modal.wp.scss'
|
||||
},
|
||||
host: {
|
||||
theme: 'modal'
|
||||
}
|
||||
})
|
||||
export class Modal {
|
||||
@ -36,7 +39,6 @@ export class Modal {
|
||||
@Prop() showBackdrop: boolean = true;
|
||||
|
||||
|
||||
|
||||
private animation: Animation;
|
||||
|
||||
@Listen('ionDismiss')
|
||||
|
||||
Reference in New Issue
Block a user