fix md tabs transition for direction

This commit is contained in:
Adam Bradley
2015-09-13 21:39:30 -05:00
parent 219bd18892
commit dc1c997f52

View File

@ -70,11 +70,11 @@ class MaterialTransition extends Transition {
let tabBarEle = nav.tabs.elementRef.nativeElement.querySelector('.tab-bar-container'); let tabBarEle = nav.tabs.elementRef.nativeElement.querySelector('.tab-bar-container');
let tabBar = new Animation(tabBarEle); let tabBar = new Animation(tabBarEle);
if (itemLength === 1) { if (itemLength === 1 && opts.direction == 'back') {
tabBar.fromTo('height', '0px', '69px'); tabBar.fromTo('height', '0px', '69px');
tabBar.fadeIn(); tabBar.fadeIn();
} else if (itemLength === 2) { } else if (itemLength === 2 && opts.direction == 'forward') {
tabBar.fromTo('height', '69px', '0px'); tabBar.fromTo('height', '69px', '0px');
tabBar.fadeOut(); tabBar.fadeOut();
} }