File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -417,22 +417,20 @@ <h2>Project Gamma</h2>
417417 scrollHorizontally : true ,
418418
419419 onLeave : function ( origin , destination , direction ) {
420- if ( origin && origin . item ) {
421- const activeSlide = origin . item . querySelector ( ".fp-slide.active" ) ;
422-
423- if ( activeSlide && activeSlide . dataset . anchor && ! activeSlide . dataset . anchor . endsWith ( "-text" ) ) {
424- window . fullpage_api . silentMoveTo ( origin . index + 1 , 0 ) ;
425- }
426- }
427-
428420 if ( window . RaceNavigation ) {
429421 window . RaceNavigation . update ( destination . index , 0 , direction ) ;
430422 }
431423 } ,
432424
433425 afterLoad : function ( origin , destination , direction ) {
434426 if ( window . RaceNavigation ) {
435- window . RaceNavigation . update ( destination . index , 0 , direction ) ;
427+ let slideIndex = 0 ;
428+ if ( destination && destination . item ) {
429+ const slides = Array . from ( destination . item . querySelectorAll ( ".fp-slide" ) ) ;
430+ const activeSlide = destination . item . querySelector ( ".fp-slide.active" ) ;
431+ slideIndex = activeSlide ? slides . indexOf ( activeSlide ) : 0 ;
432+ }
433+ window . RaceNavigation . update ( destination . index , slideIndex , direction ) ;
436434 }
437435 } ,
438436
You can’t perform that action at this time.
0 commit comments