Skip to content

Commit e4bf30d

Browse files
committed
fullpage.js 2.7.4
- Fixed bug with responsiveHeight alvarotrigo#1567 - Fixed bug that prevented the fire of callbacks when using scrollBar:true alvarotrigo#1556 - Fixed bug that set fitToSection:true when using menu or bullet navigation alvarotrigo#1561 - Removed warning regarding requestAnimationFrame prefix alvarotrigo#1559
1 parent 260c9ed commit e4bf30d

File tree

6 files changed

+61
-60
lines changed

6 files changed

+61
-60
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![preview](https://raw.github.com/alvarotrigo/fullPage.js/master/examples/imgs/intro.png)
44
![compatibility](https://raw.github.com/alvarotrigo/fullPage.js/master/examples/imgs/compatible.gif)
5-
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.7.3-brightgreen.svg)
5+
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.7.4-brightgreen.svg)
66
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
77
7Kb gziped!
88

jquery.fullPage.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* fullPage 2.6.6
2+
* fullPage 2.7.4
33
* https://github.com/alvarotrigo/fullPage.js
44
* MIT licensed
55
*

jquery.fullPage.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 2.7.3
2+
* fullPage 2.7.4
33
* https://github.com/alvarotrigo/fullPage.js
44
* @license MIT licensed
55
*
@@ -872,7 +872,9 @@
872872
}
873873
scrollPage(currentSection);
874874

875-
isResizing = false;
875+
requestAnimFrame(function(){
876+
isResizing = false;
877+
});
876878
}
877879
}, options.fitToSectionDelay);
878880
}
@@ -1178,11 +1180,11 @@
11781180

11791181
//IE < 10 pollify for requestAnimationFrame
11801182
window.requestAnimFrame = function(){
1181-
return window.webkitRequestAnimationFrame ||
1183+
return window.requestAnimationFrame ||
1184+
window.webkitRequestAnimationFrame ||
11821185
window.mozRequestAnimationFrame ||
11831186
window.oRequestAnimationFrame ||
11841187
window.msRequestAnimationFrame ||
1185-
window.requestAnimationFrame ||
11861188
function(callback){ callback() }
11871189
}();
11881190

@@ -1374,8 +1376,6 @@
13741376

13751377
v.element.find('.fp-scrollable').mouseover();
13761378

1377-
FP.setFitToSection(!v.element.hasClass(AUTO_HEIGHT));
1378-
13791379
//callback (afterLoad) if the site is not just resizing and readjusting the slides
13801380
$.isFunction(options.afterLoad) && !v.localIsResizing && options.afterLoad.call(v.element, v.anchorLink, (v.sectionIndex + 1));
13811381

@@ -1790,17 +1790,18 @@
17901790
var widthLimit = options.responsive || options.responsiveWidth; //backwards compatiblity
17911791
var heightLimit = options.responsiveHeight;
17921792

1793-
if(widthLimit){
1794-
FP.setResponsive($window.width() < widthLimit);
1793+
//only calculating what we need. Remember its called on the resize event.
1794+
var isBreakingPointWidth = widthLimit && $window.width() < widthLimit;
1795+
var isBreakingPointHeight = heightLimit && $window.height() < heightLimit;
1796+
1797+
if(widthLimit && heightLimit){
1798+
FP.setResponsive(isBreakingPointWidth || isBreakingPointHeight);
17951799
}
1796-
1797-
if(heightLimit){
1798-
var isResponsive = container.hasClass(RESPONSIVE);
1799-
1800-
//if its not already in responsive mode because of the `width` limit
1801-
if(!isResponsive){
1802-
FP.setResponsive($window.height() < heightLimit);
1803-
}
1800+
else if(widthLimit){
1801+
FP.setResponsive(isBreakingPointWidth);
1802+
}
1803+
else if(heightLimit){
1804+
FP.setResponsive(isBreakingPointHeight);
18041805
}
18051806
}
18061807

0 commit comments

Comments
 (0)