File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*!
2
- * fullPage 2.8.4
2
+ * fullPage 2.8.5
3
3
* https://github.com/alvarotrigo/fullPage.js
4
4
* @license MIT licensed
5
5
*
176
176
afterResize : null ,
177
177
afterReBuild : null ,
178
178
afterSlideLoad : null ,
179
- onSlideLeave : null
179
+ onSlideLeave : null ,
180
+ afterResponsive : null
180
181
} , options ) ;
181
182
182
183
//flag to avoid very fast sliding for landscape sliders
485
486
FP . setFitToSection ( false , 'internal' ) ;
486
487
$ ( SECTION_NAV_SEL ) . hide ( ) ;
487
488
$body . addClass ( RESPONSIVE ) ;
489
+ $ . isFunction ( options . afterResponsive ) && options . afterResponsive . call ( container , active ) ;
488
490
}
489
491
}
490
492
else if ( isResponsive ) {
491
493
FP . setAutoScrolling ( originals . autoScrolling , 'internal' ) ;
492
494
FP . setFitToSection ( originals . autoScrolling , 'internal' ) ;
493
495
$ ( SECTION_NAV_SEL ) . show ( ) ;
494
496
$body . removeClass ( RESPONSIVE ) ;
497
+ $ . isFunction ( options . afterResponsive ) && options . afterResponsive . call ( container , active ) ;
495
498
}
496
499
} ;
497
500
1327
1330
1328
1331
/**
1329
1332
* Maintains the active slides in the viewport
1330
- * (Because he `scroll` animation might get lost with some actions, such as when using continuousVertical)
1333
+ * (Because the `scroll` animation might get lost with some actions, such as when using continuousVertical)
1331
1334
*/
1332
1335
function keepSlidesPosition ( ) {
1333
1336
$ ( SLIDE_ACTIVE_SEL ) . each ( function ( ) {
1911
1914
} ;
1912
1915
v . xMovement = getXmovement ( v . prevSlideIndex , v . slideIndex ) ;
1913
1916
1914
- canScroll = false ;
1917
+ //important!! Only do it when not resizing
1918
+ if ( ! v . localIsResizing ) {
1919
+ //preventing from scrolling to the next/prev section when using scrollHorizontally
1920
+ canScroll = false ;
1921
+ }
1915
1922
1916
1923
if ( options . onSlideLeave ) {
1917
1924
You can’t perform that action at this time.
0 commit comments