mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
fix(nav): animation backdrop
This commit is contained in:
1
core/src/components.d.ts
vendored
1
core/src/components.d.ts
vendored
@ -1486,7 +1486,6 @@ declare global {
|
|||||||
* Returns the length of navigation stack
|
* Returns the length of navigation stack
|
||||||
*/
|
*/
|
||||||
'isAnimating': () => boolean;
|
'isAnimating': () => boolean;
|
||||||
'length': () => number;
|
|
||||||
/**
|
/**
|
||||||
* Call to navigate back from a current component. Similar to push(), you can also pass navigation options.
|
* Call to navigate back from a current component. Similar to push(), you can also pass navigation options.
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,6 @@ export interface Animation {
|
|||||||
beforeClearStyles(propertyNames: string[]): Animation;
|
beforeClearStyles(propertyNames: string[]): Animation;
|
||||||
beforeAddRead(domReadFn: () => void): Animation;
|
beforeAddRead(domReadFn: () => void): Animation;
|
||||||
beforeAddWrite(domWriteFn: () => void): Animation;
|
beforeAddWrite(domWriteFn: () => void): Animation;
|
||||||
duringAddClass(className: string): Animation;
|
|
||||||
afterAddClass(className: string): Animation;
|
afterAddClass(className: string): Animation;
|
||||||
afterRemoveClass(className: string): Animation;
|
afterRemoveClass(className: string): Animation;
|
||||||
afterStyles(styles: { [property: string]: any; }): Animation;
|
afterStyles(styles: { [property: string]: any; }): Animation;
|
||||||
|
@ -248,15 +248,6 @@ export class Animator {
|
|||||||
return this;
|
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
|
* Set CSS inline styles to this animation's elements
|
||||||
* before the animation begins.
|
* before the animation begins.
|
||||||
@ -817,6 +808,7 @@ export class Animator {
|
|||||||
const elementClassList = el.classList;
|
const elementClassList = el.classList;
|
||||||
|
|
||||||
// css classes to add before the animation
|
// css classes to add before the animation
|
||||||
|
|
||||||
if (addClasses) {
|
if (addClasses) {
|
||||||
for (const c of addClasses) {
|
for (const c of addClasses) {
|
||||||
// ******** DOM WRITE ****************
|
// ******** DOM WRITE ****************
|
||||||
|
@ -484,7 +484,6 @@ export class Datetime {
|
|||||||
private updateText() {
|
private updateText() {
|
||||||
// create the text of the formatted data
|
// create the text of the formatted data
|
||||||
const template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT;
|
const template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT;
|
||||||
// debugger;
|
|
||||||
this.text = renderDatetime(template, this.datetimeValue, this.locale);
|
this.text = renderDatetime(template, this.datetimeValue, this.locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,11 +441,6 @@ export class Nav implements NavOutlet {
|
|||||||
return this.isTransitioning;
|
return this.isTransitioning;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Method()
|
|
||||||
length() {
|
|
||||||
return this.views.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
// _queueTrns() adds a navigation stack change to the queue and schedules it to run:
|
// _queueTrns() adds a navigation stack change to the queue and schedules it to run:
|
||||||
// 1. _nextTrns(): consumes the next transition in the queue
|
// 1. _nextTrns(): consumes the next transition in the queue
|
||||||
// 2. _viewInit(): initializes enteringView if required
|
// 2. _viewInit(): initializes enteringView if required
|
||||||
|
@ -33,7 +33,7 @@ export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement
|
|||||||
const navDecor = new AnimationC();
|
const navDecor = new AnimationC();
|
||||||
navDecor
|
navDecor
|
||||||
.addElement(navEl)
|
.addElement(navEl)
|
||||||
.duringAddClass('show-decor');
|
.beforeAddClass('show-decor');
|
||||||
|
|
||||||
rootTransition.add(navDecor);
|
rootTransition.add(navDecor);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user