/
githubmirror
/
fullPage.js
Обзор
Документация
Войти
/
githubmirror
/
fullPage.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/js/scroll/moveTo.js
20 строк
624 B
Alvaro Trigo López
- v4 version
16 мар 2022, 21:03
16 мар 2022, 21:03
902c448
Код
Авторство
О чём код?
import { getSectionByAnchor } from "../common/getSectionByAnchor.js"; import { scrollPage } from "./scrollPage.js"; import { scrollPageAndSlide } from "./scrollPageAndSlide.js"; import { FP } from '../common/constants'; FP.moveTo = moveTo; /** * Moves the page to the given section and slide. * Anchors or index positions can be used as params. */ export function moveTo(sectionAnchor, slideAnchor){ var destiny = getSectionByAnchor(sectionAnchor); if (typeof slideAnchor !== 'undefined'){ scrollPageAndSlide(sectionAnchor, slideAnchor); }else if(destiny != null){ scrollPage(destiny); } }