/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/utils/menu-controller/animations/reveal.ts
21 строка
838 B
Liam DeBeasi
chore(deps): update to stencil v3 (#26663)
01 фев 2023, 02:07
Не верифицирован
01 фев 2023, 02:07
1a8bd6d
Код
Авторство
О чём код?
import type { MenuI } from '../../../components/menu/menu-interface'; import { getIonMode } from '../../../global/ionic-global'; import { createAnimation } from '../../animation/animation'; import type { Animation } from '../../animation/animation-interface'; import { baseAnimation } from './base'; /** * Menu Reveal Type * The content slides over to reveal the menu underneath. * The menu itself, which is under the content, does not move. */ export const menuRevealAnimation = (menu: MenuI): Animation => { const mode = getIonMode(menu); const openedX = menu.width * (menu.isEndSide ? -1 : 1) + 'px'; const contentOpen = createAnimation() .addElement(menu.contentEl!) // REVIEW .fromTo('transform', 'translateX(0px)', `translateX(${openedX})`); return baseAnimation(mode === 'ios').addAnimation(contentOpen); };