mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix md tabs transition for direction
This commit is contained in:
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user