Skip to content

Commit ba12d97

Browse files
committed
- Updating version and dist files
1 parent dce4a7e commit ba12d97

File tree

20 files changed

+51
-30
lines changed

20 files changed

+51
-30
lines changed

README.md

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

2020
---
2121

22-
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.28-brightgreen.svg)
2323
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2424
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
2525
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)

dist/fullpage.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.27
2+
* fullPage 4.0.28
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only

dist/fullpage.extensions.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.js

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.27
2+
* fullPage 4.0.28
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -1206,6 +1206,7 @@
12061206
afterResponsive: null,
12071207
onScrollOverflow: null,
12081208
lazyLoading: true,
1209+
lazyLoadThreshold: 0,
12091210
observer: true,
12101211
scrollBeyondFullpage: true
12111212
};
@@ -1834,6 +1835,24 @@
18341835
}
18351836
});
18361837
}
1838+
function lazyLoadPanels(panel) {
1839+
var lazyLoadThresold = getOptions().lazyLoadThreshold;
1840+
lazyLoad(panel.item);
1841+
1842+
if (lazyLoadThresold) {
1843+
lazyLoadDirection(panel, 'prev', lazyLoadThresold);
1844+
lazyLoadDirection(panel, 'next', lazyLoadThresold);
1845+
}
1846+
} // Lazy load "count" number of panels in a specific direction
1847+
1848+
function lazyLoadDirection(startPanel, direction, count) {
1849+
var currentPanel = startPanel;
1850+
1851+
for (var i = 0; i < count && (currentPanel = currentPanel[direction]()); i++) {
1852+
console.log(currentPanel.item);
1853+
lazyLoad(currentPanel.item);
1854+
}
1855+
}
18371856

18381857
/**
18391858
* Sets a class for the body of the page depending on the active section / slide
@@ -2257,7 +2276,7 @@
22572276

22582277
$(SECTION_SEL + ':not(' + ACTIVE_SEL + ')').forEach(function (section) {
22592278
if (isSectionInViewport(section)) {
2260-
lazyLoad(section);
2279+
lazyLoadPanels(getPanelByElement(section));
22612280
}
22622281
});
22632282
}
@@ -2519,7 +2538,7 @@
25192538
addClass(element, ACTIVE);
25202539
removeClass(siblings(element), ACTIVE);
25212540
updateState();
2522-
lazyLoad(element); //preventing from activating the MouseWheelHandler event
2541+
lazyLoadPanels(section); //preventing from activating the MouseWheelHandler event
25232542
//more than once if the page is scrolling
25242543

25252544
setState({
@@ -3174,7 +3193,7 @@
31743193

31753194
if (!v.localIsResizing) {
31763195
stopMedia(v.prevSlide);
3177-
lazyLoad(destiny);
3196+
lazyLoadPanels(slide);
31783197
}
31793198

31803199
toggleControlArrows(v); //only changing the URL if the slides are in the current section (not for resize re-adjusting)
@@ -5308,7 +5327,7 @@
53085327
}
53095328

53105329
stopMedia(leavingSection);
5311-
lazyLoad(currentSectionElem);
5330+
lazyLoadPanels(currentSection);
53125331
playMedia(currentSectionElem);
53135332
activateMenuAndNav(anchorLink, sectionIndex - 1);
53145333

@@ -5508,7 +5527,7 @@
55085527
});
55095528
});
55105529
var t = ["-"];
5511-
var n = "\x32\x30\x32\x34\x2d\x37\x2d\x31\x39".split("-"),
5530+
var n = "\x32\x30\x32\x34\x2d\x37\x2d\x32\x32".split("-"),
55125531
e = new Date(n[0], n[1], n[2]),
55135532
r = ["se", "licen", "-", "v3", "l", "gp"];
55145533

@@ -5661,7 +5680,7 @@
56615680
var section = getState().activeSection;
56625681
var sectionElem = getState().activeSection.item;
56635682
addClass(sectionElem, COMPLETELY);
5664-
lazyLoad(sectionElem);
5683+
lazyLoadPanels(getState().activeSection);
56655684
lazyLoadOthers();
56665685
playMedia(sectionElem);
56675686

@@ -5969,7 +5988,7 @@
59695988
}; //public functions
59705989

59715990

5972-
FP.version = '4.0.27';
5991+
FP.version = '4.0.28';
59735992
FP.test = Object.assign(FP.test, {
59745993
top: '0px',
59755994
translate3d: 'translate3d(0px, 0px, 0px)',

dist/fullpage.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulp/build.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ gulp.task('update-version', function(done){
4141
// updating readme version
4242
gulp.src([
4343
'./README.md',
44+
'./lang/brazilian-portuguese/README.md',
4445
'./lang/chinese/README.md',
4546
'./lang/french/README.md',
47+
'./lang/japanese/README.md',
4648
'./lang/korean/README.md',
4749
'./lang/russian/README.md',
48-
'./lang/spanish/README.md',
49-
'./lang/brazilian-portuguese/README.md',
50+
'./lang/spanish/README.md'
5051
], { base: "./" })
5152
.pipe(replace(/(fullPage.js-v)([\d\.]+)/g, "$1" + fpPackage.version))
5253
.pipe(gulp.dest('.'));

lang/brazilian-portuguese/README.md

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

2020
---
2121

22-
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.28-brightgreen.svg)
2323
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2424
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
2525
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)

lang/chinese/README.md

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

1919
---
2020

21-
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27,2-brightgreen.svg)
21+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.28,2-brightgreen.svg)
2222
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2323
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
2424
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)

0 commit comments

Comments
 (0)