diff --git a/core/src/components/nav/test/routing/index.html b/core/src/components/nav/test/routing/index.html index 337d5f7392..07a92e6e1a 100644 --- a/core/src/components/nav/test/routing/index.html +++ b/core/src/components/nav/test/routing/index.html @@ -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); - }; + };*/ diff --git a/core/src/utils/animation/animation.ts b/core/src/utils/animation/animation.ts index 86ca6c2f14..7904d3a151 100644 --- a/core/src/utils/animation/animation.ts +++ b/core/src/utils/animation/animation.ts @@ -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[] = []; diff --git a/core/src/utils/overlays.ts b/core/src/utils/overlays.ts index d011aecab0..33d55319f0 100644 --- a/core/src/utils/overlays.ts +++ b/core/src/utils/overlays.ts @@ -195,6 +195,9 @@ const overlayAnimation = async ( isAnimationBuilder = true; } catch (err) { animation = animationBuilder(aniRoot, opts); + + // TODO: Clean up + animation.fill('both'); } overlay.animation = animation; diff --git a/core/src/utils/transition/index.ts b/core/src/utils/transition/index.ts index d4a8f9bfbf..1d5943c1b9 100644 --- a/core/src/utils/transition/index.ts +++ b/core/src/utils/transition/index.ts @@ -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; }