fix(transition): always use animation, just no duration

Closes #227
This commit is contained in:
Adam Bradley
2015-10-01 20:45:42 -05:00
parent 86a8175d3a
commit faa9596489
6 changed files with 53 additions and 72 deletions

View File

@@ -69,7 +69,7 @@ export class NavController extends Ion {
// do not animate if this is the first in the stack
if (!this.views.length) {
opts.animation = 'none';
opts.animate = false;
}
// default the direction to "forward"
@@ -269,15 +269,10 @@ export class NavController extends Ion {
return callback();
}
if (opts.animate === false) {
opts.animation = 'none';
} else if (!opts.animation) {
if (!opts.animation) {
opts.animation = this.config.setting('viewTransition');
}
opts.animate = (opts.animation !== 'none');
// wait for the new view to complete setup
enteringView.stage(() => {
@@ -295,7 +290,7 @@ export class NavController extends Ion {
// init the transition animation
let transAnimation = Transition.create(this, opts);
if (!opts.animate) {
if (opts.animate === false) {
// force it to not animate the elements, just apply the "to" styles
transAnimation.duration(0);
}

View File

@@ -210,15 +210,6 @@ export class ViewController {
}
}
/**
* TODO
* @returns {TODO} TODO
*/
postRender() {
// the elements are in the DOM and the browser
// has rendered them in their correct locations
}
/**
* The view has loaded. This event only happens once per view being