This commit is contained in:
Liam DeBeasi
2019-07-26 12:16:36 -04:00
parent 3f21c5e964
commit 4a12584f7c
4 changed files with 18 additions and 10 deletions

View File

@@ -96,7 +96,13 @@
customElements.define('page-two', PageTwo);
customElements.define('page-three', PageThree);
window.Ionic.config.navAnimation = (AnimationC, navEl, opts) => {
/*window.Ionic.config.navAnimation = (AnimationC, navEl, opts) => {
const shadow = (el) => {
return el.shadowRoot || el;
};
const DURATION = 540;
const EASING = 'cubic-bezier(0.32,0.72,0,1)';
const OPACITY = 'opacity';
@@ -388,7 +394,7 @@
// Return the rootTransition promise
return Promise.resolve(rootTransition);
};
};*/
</script>
</head>

View File

@@ -11,7 +11,7 @@ export const createAnimation = (): Animation => {
let _duration: number | undefined;
let _easing: string | undefined;
let _iterations: number | undefined;
let _fill: 'auto' | 'none' | 'forwards' | 'backwards' | 'both' | undefined = 'forwards';
let _fill: 'auto' | 'none' | 'forwards' | 'backwards' | 'both' | undefined;
let _direction: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse' | undefined;
let _keyframes: any[] = [];

View File

@@ -195,6 +195,9 @@ const overlayAnimation = async (
isAnimationBuilder = true;
} catch (err) {
animation = animationBuilder(aniRoot, opts);
// TODO: Clean up
animation.fill('both');
}
overlay.animation = animation;

View File

@@ -84,12 +84,11 @@ const animation = async (animationBuilder: IonicAnimation | AnimationBuilder, op
* TODO: Remove AnimationBuilder
*/
let trans;
// let isAnimationBuilder = false;
try {
trans = await import('../animation/old-animation').then(mod => mod.create(animationBuilder as any, opts.baseEl, opts));
// isAnimationBuilder = true;
} catch (err) {
// @ts-ignore
// TODO: Fix this type error
trans = animationBuilder(opts.baseEl, opts);
}
@@ -97,18 +96,18 @@ const animation = async (animationBuilder: IonicAnimation | AnimationBuilder, op
const didComplete = await playTransition(trans, opts);
trans.hasCompleted = didComplete;
(trans as any).hasCompleted = didComplete;
if (opts.progressCallback) {
opts.progressCallback(undefined);
}
if (trans.hasCompleted) {
if ((trans as any).hasCompleted) {
fireDidEvents(opts.enteringEl, opts.leavingEl);
}
return {
hasCompleted: trans.hasCompleted,
hasCompleted: (trans as any).hasCompleted,
animation: trans
};
};
@@ -248,5 +247,5 @@ export interface TransitionOptions extends NavOptions {
export interface TransitionResult {
hasCompleted: boolean;
animation?: Animation;
animation?: Animation | IonicAnimation;
}