From 948d0839c9df3ce4119e7deede03bb4b76e83402 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Tue, 7 Aug 2018 21:54:15 +0200 Subject: [PATCH] fix(nav): animation backdrop --- core/src/components.d.ts | 1 - .../animation-controller/animation-interface.tsx | 1 - core/src/components/animation-controller/animator.tsx | 10 +--------- core/src/components/datetime/datetime.tsx | 1 - core/src/components/nav/nav.tsx | 5 ----- core/src/utils/animations/ios.transition.ts | 2 +- 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 353af91f5d..71320d95a7 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1486,7 +1486,6 @@ declare global { * Returns the length of navigation stack */ 'isAnimating': () => boolean; - 'length': () => number; /** * Call to navigate back from a current component. Similar to push(), you can also pass navigation options. */ diff --git a/core/src/components/animation-controller/animation-interface.tsx b/core/src/components/animation-controller/animation-interface.tsx index a1b74cfb9b..ef06d3461e 100644 --- a/core/src/components/animation-controller/animation-interface.tsx +++ b/core/src/components/animation-controller/animation-interface.tsx @@ -23,7 +23,6 @@ export interface Animation { beforeClearStyles(propertyNames: string[]): Animation; beforeAddRead(domReadFn: () => void): Animation; beforeAddWrite(domWriteFn: () => void): Animation; - duringAddClass(className: string): Animation; afterAddClass(className: string): Animation; afterRemoveClass(className: string): Animation; afterStyles(styles: { [property: string]: any; }): Animation; diff --git a/core/src/components/animation-controller/animator.tsx b/core/src/components/animation-controller/animator.tsx index 5a9169d8bc..9b7d9fe4e8 100644 --- a/core/src/components/animation-controller/animator.tsx +++ b/core/src/components/animation-controller/animator.tsx @@ -248,15 +248,6 @@ export class Animator { return this; } - /** - * Sets a CSS class during the duration of the animation. - */ - duringAddClass(className: string): Animator { - this.beforeAddClass(className); - this.afterRemoveClass(className); - return this; - } - /** * Set CSS inline styles to this animation's elements * before the animation begins. @@ -817,6 +808,7 @@ export class Animator { const elementClassList = el.classList; // css classes to add before the animation + if (addClasses) { for (const c of addClasses) { // ******** DOM WRITE **************** diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 1e6cc89158..785d4f32d3 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -484,7 +484,6 @@ export class Datetime { private updateText() { // create the text of the formatted data const template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT; - // debugger; this.text = renderDatetime(template, this.datetimeValue, this.locale); } diff --git a/core/src/components/nav/nav.tsx b/core/src/components/nav/nav.tsx index 096071cc22..7c78b37c87 100644 --- a/core/src/components/nav/nav.tsx +++ b/core/src/components/nav/nav.tsx @@ -441,11 +441,6 @@ export class Nav implements NavOutlet { return this.isTransitioning; } - @Method() - length() { - return this.views.length; - } - // _queueTrns() adds a navigation stack change to the queue and schedules it to run: // 1. _nextTrns(): consumes the next transition in the queue // 2. _viewInit(): initializes enteringView if required diff --git a/core/src/utils/animations/ios.transition.ts b/core/src/utils/animations/ios.transition.ts index ccbb207a7b..17bf3852a5 100644 --- a/core/src/utils/animations/ios.transition.ts +++ b/core/src/utils/animations/ios.transition.ts @@ -33,7 +33,7 @@ export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement const navDecor = new AnimationC(); navDecor .addElement(navEl) - .duringAddClass('show-decor'); + .beforeAddClass('show-decor'); rootTransition.add(navDecor); }