UNPKG

@ionic/core

Version:
11 lines (10 loc) 412 B
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); }); }