File tree Expand file tree Collapse file tree 2 files changed +54
-39
lines changed Expand file tree Collapse file tree 2 files changed +54
-39
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * fullPage 2.2.5.2
2
+ * fullPage 2.2.6
3
3
* https://github.com/alvarotrigo/fullPage.js
4
4
* MIT licensed
5
5
*
676
676
landscapeScroll ( slides , destiny ) ;
677
677
}
678
678
679
+ /**
680
+ * Maintains the active slides in the viewport
681
+ * (Because he `scroll` animation might get lost with some actions, such as when using continuousVertical)
682
+ */
683
+ function keepSlidesPosition ( ) {
684
+ $ ( '.fp-slide.active' ) . each ( function ( ) {
685
+ silentLandscapeScroll ( $ ( this ) ) ;
686
+ } ) ;
687
+ }
688
+
679
689
function scrollPage ( element , callback , isMovementUp ) {
680
690
var scrollOptions = { } , scrolledElement ;
681
691
var dest = element . position ( ) ;
715
725
// Maintain the displayed position (now that we changed the element order)
716
726
silentScroll ( $ ( '.fp-section.active' ) . position ( ) . top ) ;
717
727
728
+ // Maintain the active slides visible in the viewport
729
+ keepSlidesPosition ( ) ;
730
+
718
731
// save for later the elements that still need to be reordered
719
732
var wrapAroundElements = activeSection ;
720
733
759
772
}
760
773
761
774
silentScroll ( $ ( '.fp-section.active' ) . position ( ) . top ) ;
775
+
776
+ // Maintain the active slides visible in the viewport
777
+ keepSlidesPosition ( ) ;
762
778
} ;
763
779
764
780
You can’t perform that action at this time.
0 commit comments