Skip to content

Commit b602759

Browse files
authored
Merge pull request #4693 from alvarotrigo/dev
Merging dev branch 4.0.34
2 parents 17050b6 + b68d64d commit b602759

25 files changed

+125
-87
lines changed

README.md

Lines changed: 4 additions & 4 deletions
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.33-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.34-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)
@@ -112,8 +112,7 @@ npm install fullpage.js
112112
Using Webpack, Browserify or Require.js? Check [how to use fullPage.js with module loaders](https://github.com/alvarotrigo/fullPage.js/wiki/Use-module-loaders-for-fullPage.js).
113113

114114
### Optional use of CDN
115-
If you prefer to use a CDN to load the needed files, fullPage.js is in CDNJS:
116-
https://cdnjs.com/libraries/fullPage.js
115+
If you prefer to use a CDN to load the needed files, fullPage.js is in, [JSDelivr](https://www.jsdelivr.com/package/npm/fullpage.js), [UNPKG](https://unpkg.com/browse/fullpage.js/dist/), [CDNJS](https://cdnjs.com/libraries/fullPage.js) and others.
117116

118117
### Required HTML structure
119118
Start your HTML document with the compulsory [HTML DOCTYPE declaration](https://www.corelangs.com/html/introduction/doctype.html) on the 1st line of your HTML code. You might have troubles with sections heights otherwise. The examples provided use HTML 5 doctype `<!DOCTYPE html>`.
@@ -327,6 +326,7 @@ Fullpage.js adds multiple classes in different elements to keep a record of the
327326

328327
- `active` is added the current visible section and slide.
329328
- `active` is added to the current menu element (if using the `menu` option).
329+
- `fp-loaded` is added to the section or slide that triggers lazy loading of media content.
330330
- A class of the form `fp-viewing-SECTION-SLIDE` is added to the `body` element of the site. (eg: [`fp-viewing-secondPage-0`](https://alvarotrigo.com/fullPage/#secondPage)) The `SECTION` and `SLIDE` parts will be the anchors (or indexes if no anchor is provided) of the current section and slide.
331331
- `fp-responsive` is added to the `body` element when the entering in the responsive mode
332332
- `fp-enabled` is added to the `html` element when fullpage.js is enabled. (and removed when destroyed).
@@ -694,7 +694,7 @@ Allows you to configure the parameters for the cards effect when using the optio
694694
### credits
695695

696696
(default `{enabled: true, label: 'Made with fullpage.js', position: 'right'}`).
697-
Defines whether to use fullPage.js credits. As per clause 0, 4, 5 and 7 of the GPLv3 licecense, those using fullPage.js under the GPLv3 are required to give prominent notice that fullPage.js is in use. We recommend including attribution by keeping this option enabled.
697+
Defines whether to use fullPage.js credits. As per clause 0, 4, 5 and 7 of the GPLv3 licecense, those using fullPage. js under the GPLv3 are required to give prominent notice that fullPage.js is in use. We recommend including attribution by keeping this option enabled. **Note:** This option requires a valid value `licenseKey` value.
698698

699699
## Methods
700700
You can see them in action [here](https://alvarotrigo.com/fullPage/examples/methods.html)

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.33
2+
* fullPage 4.0.34
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: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.33
2+
* fullPage 4.0.34
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -1068,7 +1068,8 @@
10681068
var ACTIVE = 'active';
10691069
var ACTIVE_SEL = '.' + ACTIVE;
10701070
var COMPLETELY = 'fp-completely';
1071-
var COMPLETELY_SEL = '.' + COMPLETELY; // section
1071+
var COMPLETELY_SEL = '.' + COMPLETELY;
1072+
var LOADED = 'fp-loaded';
10721073

10731074
var SECTION_DEFAULT_SEL = '.section';
10741075
var SECTION = 'fp-section';
@@ -1112,7 +1113,10 @@
11121113
var SLIDES_ARROW_PREV_SEL = SLIDES_ARROW_SEL + SLIDES_PREV_SEL;
11131114
var SLIDES_NEXT = 'fp-next';
11141115
var SLIDES_NEXT_SEL = '.' + SLIDES_NEXT;
1115-
var SLIDES_ARROW_NEXT_SEL = SLIDES_ARROW_SEL + SLIDES_NEXT_SEL;
1116+
var SLIDES_ARROW_NEXT_SEL = SLIDES_ARROW_SEL + SLIDES_NEXT_SEL; // Watermark
1117+
1118+
var WATERMARK = 'fp-watermark';
1119+
var WATERMARK_SEL = '.' + WATERMARK;
11161120

11171121
var defaultOptions = {
11181122
//navigation
@@ -1605,6 +1609,7 @@
16051609
if (currentTime < duration) {
16061610
window.requestAnimationFrame(_g_animateScroll);
16071611
} else if (typeof callback !== 'undefined' && !isCallbackFired) {
1612+
setScrolling(element, to);
16081613
callback();
16091614
setState({
16101615
activeAnimation: false
@@ -1838,7 +1843,9 @@
18381843
};
18391844
}
18401845
}
1841-
});
1846+
}); // Add fp-loaded class to the panel after lazy loading
1847+
1848+
addClass(panel, LOADED);
18421849
}
18431850
function lazyLoadPanels(panel) {
18441851
var lazyLoadThresold = getOptions().lazyLoadThreshold;
@@ -4891,9 +4898,7 @@
48914898

48924899
function bindEvents$6() {
48934900
// Setting VH correctly in mobile devices
4894-
resizeHandler(); // Initial set of VH units
4895-
4896-
setVhUnits(); //when resizing the site, we adjust the heights of the sections, slimScroll...
4901+
resizeHandler(); //when resizing the site, we adjust the heights of the sections, slimScroll...
48974902

48984903
windowAddEvent('resize', resizeHandler);
48994904
EventEmitter.on(events.onDestroy, onDestroy$3);
@@ -4961,6 +4966,14 @@
49614966
}
49624967
}
49634968
}
4969+
/**
4970+
* Checks if VH units need to be set based on scrolling configuration
4971+
*/
4972+
4973+
4974+
function shouldSetVhUnits() {
4975+
return !state.isBeyondFullpage && !getOptions().autoScrolling;
4976+
}
49644977
/**
49654978
* When resizing the site, we adjust the heights of the sections, slimScroll...
49664979
*/
@@ -4974,7 +4987,7 @@
49744987
if (!isTouchDevice || getOptions().adjustOnNavChange) {
49754988
setSectionsHeight('');
49764989

4977-
if (!getOptions().autoScrolling && !state.isBeyondFullpage) {
4990+
if (shouldSetVhUnits()) {
49784991
setVhUnits();
49794992
}
49804993
}
@@ -5094,12 +5107,10 @@
50945107

50955108

50965109
function setVhUnits() {
5097-
if (!getOptions().autoScrolling || getOptions().scrollBar) {
5098-
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
5099-
var vh = win.innerHeight * 0.01; // Then we set the value in the --vh custom property to the root of the document
5110+
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
5111+
var vh = win.innerHeight * 0.01; // Then we set the value in the --vh custom property to the root of the document
51005112

5101-
doc.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
5102-
}
5113+
doc.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
51035114
}
51045115

51055116
function getAnchorsURL() {
@@ -5492,7 +5503,7 @@
54925503
function init$1() {
54935504
var position = getOptions().credits.position || 'right';
54945505
var positionStyle = ['left', 'right'].indexOf(position) > -1 ? "".concat(position, ": 0;") : '';
5495-
var waterMark = "\n <div class=\"fp-watermark\" style=\"".concat(positionStyle, "\">\n <a href=\"https://alvarotrigo.com/fullPage/\" \n rel=\"nofollow noopener\" \n target=\"_blank\" \n style=\"text-decoration:none; color: #000;\">\n ").concat(getOptions().credits.label || 'Made with fullPage.js', "\n </a>\n </div>\n ");
5506+
var waterMark = "\n <div class=\"".concat(WATERMARK, "\" style=\"").concat(positionStyle, "\">\n <a href=\"https://alvarotrigo.com/fullPage/\" \n rel=\"nofollow noopener\" \n target=\"_blank\" \n style=\"text-decoration:none; color: #000;\">\n ").concat(getOptions().credits.label || 'Made with fullPage.js', "\n </a>\n </div>\n ");
54965507
var lastSection = getLast(state.sections);
54975508
var shouldUseWaterMark = !state.isValid || getOptions().credits.enabled;
54985509

@@ -5559,7 +5570,7 @@
55595570
});
55605571
});
55615572
var t = ["-"];
5562-
var n = "\x32\x30\x32\x35\x2d\x30\x2d\x32\x37".split("-"),
5573+
var n = "\x32\x30\x32\x35\x2d\x32\x2d\x33".split("-"),
55635574
e = new Date(n[0], n[1], n[2]),
55645575
r = ["se", "licen", "-", "v3", "l", "gp"];
55655576

@@ -5799,7 +5810,7 @@
57995810
$('img[data-srcset]').forEach(function (item) {
58005811
setSrc(item, 'srcset');
58015812
});
5802-
remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL)); //removing inline styles
5813+
remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL + ', ' + WATERMARK_SEL)); //removing inline styles
58035814

58045815
css(getNodes(getState().sections), {
58055816
'height': '',
@@ -5835,7 +5846,7 @@
58355846
scrollOverflowHandler.destroyWrapper(item);
58365847
}
58375848

5838-
removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY + ' ' + IS_OVERFLOW);
5849+
removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY + ' ' + IS_OVERFLOW + ' ' + LOADED);
58395850
var previousStyles = getAttr(item, 'data-fp-styles');
58405851

58415852
if (previousStyles) {
@@ -6020,7 +6031,7 @@
60206031
}; //public functions
60216032

60226033

6023-
FP.version = '4.0.33';
6034+
FP.version = '4.0.34';
60246035
FP.test = Object.assign(FP.test, {
60256036
top: '0px',
60266037
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.

0 commit comments

Comments
 (0)