File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*!
2
- * fullPage 2.8.7
2
+ * fullPage 2.8.8
3
3
* https://github.com/alvarotrigo/fullPage.js
4
4
* @license MIT licensed
5
5
*
938
938
var isAtBottom = $body . height ( ) - $window . height ( ) === currentScroll ;
939
939
var sections = document . querySelectorAll ( SECTION_SEL ) ;
940
940
941
- //when using `auto-height` for a small last section it won't take most of the viewport
941
+ //when using `auto-height` for a small last section it won't be centered in the viewport
942
942
if ( isAtBottom ) {
943
943
visibleSectionIndex = sections . length - 1 ;
944
944
}
945
+ //is at top? when using `auto-height` for a small first section it won't be centered in the viewport
946
+ else if ( ! currentScroll ) {
947
+ visibleSectionIndex = 0 ;
948
+ }
945
949
946
950
//taking the section which is showing more content in the viewport
947
951
else {
You can’t perform that action at this time.
0 commit comments