@ionic/core
Version:
Base components for Ionic
11 lines (10 loc) • 412 B
JavaScript
import { baseAnimation } from './base';
export function menuRevealAnimation(AnimationC, _, menu) {
const openedX = (menu.width * (menu.isEndSide ? -1 : 1)) + 'px';
const contentOpen = new AnimationC()
.addElement(menu.contentEl)
.fromTo('translateX', '0px', openedX);
return baseAnimation(AnimationC).then(animation => {
return animation.add(contentOpen);
});
}