Skip to content

Commit 84f0758

Browse files
authored
Merge pull request #4641 from alvarotrigo/dev
Merging dev branch 4.0.26
2 parents 3e002b9 + fbbbb5a commit 84f0758

28 files changed

+1392
-103
lines changed

.github/ISSUE_TEMPLATE.md

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

33
### Link to isolated reproduction with no external CSS / JS
4-
[Ideally in jsfiddle.net (https://jsfiddle.net/alvarotrigo/ea17skjr) or codepen.io (https://codepen.io/alvarotrigo/pen/NxyPPp), links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]
4+
[Ideally in jsfiddle.net (https://jsfiddle.net/alvarotrigo/ea17skjr) or codepen.io (https://codepen.io/alvarotrigo/pen/qqabrp), links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]
55

66
### Steps to reproduce it
77
1. [First step]

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<a href="https://github.com/alvarotrigo/fullPage.js/tree/master/lang/russian#fullpagejs">Pусский</a> |
1010
<a href="https://github.com/alvarotrigo/fullPage.js/tree/master/lang/chinese#fullpagejs">中文</a> |
1111
<a href="https://github.com/alvarotrigo/fullPage.js/tree/master/lang/korean#fullpagejs">한국어</a> |
12+
<a href="https://github.com/alvarotrigo/fullPage.js/tree/master/lang/japanese#fullpagejs"> 日本語</a> |
1213
<a href="https://github.com/alvarotrigo/fullPage.js/tree/master/lang/brazilian-portuguese#fullpagejs">Português Brasileiro</a>
1314
</p>
1415

@@ -18,7 +19,7 @@
1819

1920
---
2021

21-
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.25-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.26-brightgreen.svg)
2223
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2324
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
2425
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)
@@ -98,7 +99,7 @@ bower install fullpage.js
9899
npm install fullpage.js
99100
```
100101

101-
### Including files:
102+
### Including files
102103
```html
103104
<link rel="stylesheet" type="text/css" href="fullpage.css" />
104105

@@ -108,7 +109,7 @@ npm install fullpage.js
108109
<script type="text/javascript" src="fullpage.js"></script>
109110
```
110111

111-
Using Webpack, Browserify or Require.js? Check <a href="https://github.com/alvarotrigo/fullPage.js/wiki/Use-module-loaders-for-fullPage.js">how to use fullPage.js with module loaders</a>.
112+
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).
112113

113114
### Optional use of CDN
114115
If you prefer to use a CDN to load the needed files, fullPage.js is in CDNJS:
@@ -174,13 +175,11 @@ $(document).ready(function() {
174175
scrollHorizontally: true
175176
});
176177

177-
//methods
178+
// Example of how to use fullpage.js methods
178179
$.fn.fullpage.setAllowScrolling(false);
179180
});
180181
```
181182

182-
Functions and methods can still be called in the jQuery way, as [in fullPage.js v2.X](https://github.com/alvarotrigo/fullPage.js/tree/2.9.7).
183-
184183
#### Vanilla JS example with all options
185184
A more complex initialization with all options set could look like this:
186185
```javascript
@@ -387,7 +386,7 @@ Then you will be able to use and configure them as explained in [options](https:
387386

388387
### licenseKey
389388

390-
(default `null`) **This option is compulsory.** If you use fullPage in a non open source project, then you should use the license key provided on the purchase of the fullPage Commercial License. If your project is open source and it is compatible with the GPLv3 license you can use the option `gplv3-license`. Please read more about licenses [here](https://github.com/alvarotrigo/fullPage.js#license) and [on the website](https://alvarotrigo.com/fullPage/pricing/). Example of usage:
389+
(default `null`). **This option is compulsory.** If you use fullPage in a non open source project, then you should use the license key provided on the purchase of the fullPage Commercial License. If your project is open source and it is compatible with the GPLv3 license you can [request a license key](https://alvarotrigo.com/fullPage/extensions/requestKey.html). Please read more about licenses [here](https://github.com/alvarotrigo/fullPage.js#license) and [on the website](https://alvarotrigo.com/fullPage/pricing/). Example of usage:
391390

392391
```javascript
393392
new fullpage('#fullpage', {

dist/fullpage.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.25
2+
* fullPage 4.0.26
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -95,6 +95,7 @@ html.fp-enabled,
9595
transform: translateY(-50%);
9696
-ms-transform: translateY(-50%);
9797
-webkit-transform: translate3d(0,-50%,0);
98+
pointer-events: none;
9899
}
99100
#fp-nav.fp-right {
100101
right: 17px;
@@ -112,6 +113,7 @@ html.fp-enabled,
112113
left: 0 !important;
113114
right: 0;
114115
margin: 0 auto !important;
116+
pointer-events: none;
115117
}
116118
.fp-slidesNav.fp-bottom {
117119
bottom: 17px;
@@ -144,6 +146,7 @@ html.fp-enabled,
144146
height: 100%;
145147
cursor: pointer;
146148
text-decoration: none;
149+
pointer-events: all;
147150
}
148151
#fp-nav ul li a.active span,
149152
.fp-slidesNav ul li a.active span,

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 & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.25
2+
* fullPage 4.0.26
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -979,7 +979,8 @@
979979
isDoingContinousVertical: false,
980980
timeouts: {},
981981
scrollY: 0,
982-
scrollX: 0
982+
scrollX: 0,
983+
isFullpageInitDone: false
983984
}; // @ts-ignore
984985

985986
win.state = state;
@@ -2693,7 +2694,7 @@
26932694

26942695
function fitToSection() {
26952696
//checking fitToSection again in case it was set to false before the timeout delay
2696-
if (state.canScroll) {
2697+
if (state.canScroll && getOptions().fitToSection) {
26972698
//allows to scroll to an active section and
26982699
//if the section is already active, we prevent firing callbacks
26992700
setState({
@@ -4656,7 +4657,6 @@
46564657

46574658

46584659
if (!getIsScrollAllowed().m.down && !getIsScrollAllowed().m.up) {
4659-
preventDefault(e);
46604660
return false;
46614661
}
46624662

@@ -4886,9 +4886,14 @@
48864886
if (getOptions().autoScrolling && !getOptions().scrollBar || !getOptions().fitToSection) {
48874887
setSectionsHeight(getWindowHeight());
48884888
}
4889+
} // we won't trigger fit to section on page load
4890+
// otherwise it will scroll to the worng section if using anchors #4613
4891+
4892+
4893+
if (state.isFullpageInitDone) {
4894+
fitToActiveSection();
48894895
}
48904896

4891-
fitToActiveSection();
48924897
g_isConsecutiveResize = true; //in order to call the functions only when the resize is finished
48934898
//http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
48944899

@@ -5475,32 +5480,34 @@
54755480
e += s, 0 !== n && 1 !== n || (e += "-");
54765481
}
54775482
});
5478-
var m = 0,
5479-
f = "";
5483+
var f = 0,
5484+
m = "";
54805485
return n.split("-").forEach(function (t, n) {
54815486
if (n < 4) {
54825487
var _i = 0;
54835488

54845489
for (var e = 0; e < 4; e++) {
5485-
e !== l[n] && (_i += Math.abs(o(t[e])), isNaN(t[e]) || m++);
5490+
e !== l[n] && (_i += Math.abs(o(t[e])), isNaN(t[e]) || f++);
54865491
}
54875492

54885493
var r = s(_i);
5489-
f += r;
5494+
m += r;
54905495
}
5491-
}), f += s(m), {
5496+
}), m += s(f), {
54925497
v: new Date(e + "T00:00"),
54935498
o: e.split("-")[2] === 8 * (ACTIVE.length - 2) + "",
5494-
l: f
5499+
l: m
54955500
};
54965501
}(n), l = function (t) {
54975502
var n = r[i()]().join("");
54985503
return t && 0 === n.indexOf(t) && t.length === n.length;
5504+
}(n) || function (t) {
5505+
return new RegExp("^(?=.*?[A-Y])(?=.*?[a-y])(?=.*?[0-8])(?=.*?[#?!@$%^&*-]).{8,}$").test(t);
54995506
}(n), (a || l) && (a && e <= a.v && a.l === n.split(t[0])[4] || l || a.o) || !1)
55005507
});
55015508
});
55025509
var t = ["-"];
5503-
var n = "\x32\x30\x32\x34\x2d\x35\x2d\x32\x32".split("-"),
5510+
var n = "\x32\x30\x32\x34\x2d\x36\x2d\x32\x33".split("-"),
55045511
e = new Date(n[0], n[1], n[2]),
55055512
r = ["se", "licen", "-", "v3", "l", "gp"];
55065513

@@ -5844,13 +5851,13 @@
58445851
var msgStyle = 'font-size: 15px;background:yellow;';
58455852

58465853
if (getOptions().licenseKey.trim() === '') {
5847-
showError('error', 'Fullpage.js requires a `licenseKey` option. Read about it on the following URL:');
5848-
showError('error', 'https://github.com/alvarotrigo/fullPage.js#options');
5854+
showError('error', 'Fullpage.js requires a `licenseKey` option. Read about it on the following website:');
5855+
showError('error', 'https://alvarotrigo.com/fullPage/docs/#licensekey');
58495856
} else if (!isOK()) {
58505857
showError('error', 'Incorrect `licenseKey`. Get one for fullPage.js version 4 here:');
58515858
showError('error', 'https://alvarotrigo.com/fullPage/pricing');
58525859
} else if (l && l.length < 20) {
5853-
console.warn('%c This website was made using fullPage.js slider. More info on the following website:', msgStyle);
5860+
console.warn('%c This website was made using fullPage.js slider. Learn more on the following website:', msgStyle);
58545861
console.warn('%c https://alvarotrigo.com/fullPage/', msgStyle);
58555862
}
58565863

@@ -5922,8 +5929,11 @@
59225929
EventEmitter.emit(events.beforeInit);
59235930
init();
59245931
EventEmitter.emit(events.bindEvents);
5925-
} // @ts-ignore
5932+
}
59265933

5934+
setState({
5935+
isFullpageInitDone: true
5936+
}); // @ts-ignore
59275937

59285938
return win.fullpage_api;
59295939
}
@@ -5936,7 +5946,7 @@
59365946
}; //public functions
59375947

59385948

5939-
FP.version = '4.0.25';
5949+
FP.version = '4.0.26';
59405950
FP.test = Object.assign(FP.test, {
59415951
top: '0px',
59425952
translate3d: 'translate3d(0px, 0px, 0px)',

dist/fullpage.min.css

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

0 commit comments

Comments
 (0)