Skip to content

Commit 8681601

Browse files
committed
stickman gors to page 0 from a visualization
1 parent d086e8e commit 8681601

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

website/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,14 @@ <h2>Project Gamma</h2>
341341
scrollHorizontally: true,
342342

343343
onLeave: function(origin, destination, direction) {
344+
if (origin && origin.item) {
345+
const activeSlide = origin.item.querySelector(".fp-slide.active");
346+
347+
if (activeSlide && activeSlide.dataset.anchor && !activeSlide.dataset.anchor.endsWith("-text")) {
348+
window.fullpage_api.silentMoveTo(origin.index + 1, 0);
349+
}
350+
}
351+
344352
if (window.RaceNavigation) {
345353
window.RaceNavigation.update(destination.index, 0, direction);
346354
}

0 commit comments

Comments
 (0)