Skip to content

Commit 17050b6

Browse files
authored
Merge pull request #4684 from alvarotrigo/dev
Merging dev branch 4.0.33
2 parents 9e28184 + 2e49e54 commit 17050b6

22 files changed

+88
-32
lines changed

README.md

+7-1
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.32-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33-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)
@@ -223,6 +223,7 @@ var myFullpage = new fullpage('#fullpage', {
223223
skipIntermediateItems: false,
224224
touchSensitivity: 15,
225225
bigSectionsDestination: null,
226+
adjustOnNavChange: true,
226227

227228
// Accessibility
228229
keyboardScrolling: true,
@@ -494,6 +495,11 @@ It requires the file `vendors/easings.min.js` or [jQuery UI](https://jqueryui.co
494495

495496
(default `null`) [Demo](https://codepen.io/alvarotrigo/pen/vYLdMrx) Defines how to scroll to a section which height is bigger than the viewport and when not using `scrollOverflow:true`. (Read [how to create smaller or bigger sections](https://github.com/alvarotrigo/fullPage.js#creating-smaller-or-bigger-sections)). By default fullPage.js scrolls to the top if you come from a section above the destination one and to the bottom if you come from a section below the destination one. Possible values are `top`, `bottom`, `null`.
496497

498+
### adjustOnNavChange
499+
(default `true`)
500+
Defines whether fullPage.js adjusts the height of sections when the mobile navigation or address bar changes size or toggles visibility. If set to `false`, sections will not appear as full-height when the navigation bar shrinks or hides.
501+
502+
497503
### keyboardScrolling
498504

499505
(default `true`) Defines if the content can be navigated using the keyboard.

dist/fullpage.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.32
2+
* fullPage 4.0.33
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only

dist/fullpage.extensions.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.js

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.32
2+
* fullPage 4.0.33
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -1159,6 +1159,7 @@
11591159
touchSensitivity: 5,
11601160
touchWrapper: null,
11611161
bigSectionsDestination: null,
1162+
adjustOnNavChange: true,
11621163
//Accessibility
11631164
keyboardScrolling: true,
11641165
animateAnchor: true,
@@ -2062,9 +2063,10 @@
20622063
function slideArrowHandler() {
20632064
/*jshint validthis:true */
20642065
var section = closest(this, SECTION_SEL);
2066+
var isPrevArrow = hasClass(this, SLIDES_PREV) || closest(this, SLIDES_PREV);
20652067
/*jshint validthis:true */
20662068

2067-
if (closest(this, SLIDES_PREV)) {
2069+
if (isPrevArrow) {
20682070
if (getIsScrollAllowed().m.left) {
20692071
setState({
20702072
scrollTrigger: 'slideArrow'
@@ -4889,7 +4891,9 @@
48894891

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

48944898
windowAddEvent('resize', resizeHandler);
48954899
EventEmitter.on(events.onDestroy, onDestroy$3);
@@ -4966,10 +4970,13 @@
49664970
setState({
49674971
isResizing: true
49684972
});
4969-
setSectionsHeight('');
49704973

4971-
if (!getOptions().autoScrolling && !state.isBeyondFullpage) {
4972-
setVhUnits();
4974+
if (!isTouchDevice || getOptions().adjustOnNavChange) {
4975+
setSectionsHeight('');
4976+
4977+
if (!getOptions().autoScrolling && !state.isBeyondFullpage) {
4978+
setVhUnits();
4979+
}
49734980
}
49744981

49754982
EventEmitter.emit(events.contentChanged);
@@ -5552,7 +5559,7 @@
55525559
});
55535560
});
55545561
var t = ["-"];
5555-
var n = "\x32\x30\x32\x35\x2d\x30\x2d\x31\x37".split("-"),
5562+
var n = "\x32\x30\x32\x35\x2d\x30\x2d\x32\x37".split("-"),
55565563
e = new Date(n[0], n[1], n[2]),
55575564
r = ["se", "licen", "-", "v3", "l", "gp"];
55585565

@@ -6013,7 +6020,7 @@
60136020
}; //public functions
60146021

60156022

6016-
FP.version = '4.0.32';
6023+
FP.version = '4.0.33';
60176024
FP.test = Object.assign(FP.test, {
60186025
top: '0px',
60196026
translate3d: 'translate3d(0px, 0px, 0px)',

dist/fullpage.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.min.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lang/brazilian-portuguese/README.md

+6-1
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.32-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33-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)
@@ -223,6 +223,7 @@ var myFullpage = new fullpage('#fullpage', {
223223
scrollOverflowReset: false,
224224
touchSensitivity: 15,
225225
bigSectionsDestination: null,
226+
adjustOnNavChange: true,
226227

227228
// Acessibilidade
228229
keyboardScrolling: true,
@@ -471,6 +472,10 @@ the fitting by the configured milliseconds.
471472
### bigSectionsDestination:
472473
(padrão `null`) [Demonstração](https://codepen.io/alvarotrigo/pen/vYLdMrx) Define como rolar para uma seção cuja altura é maior que a viewport e quando não estiver usando `scrollOverflow: verdadeiro`. (Leia [como criar seções menores ou maiores](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/brazilian-portuguese/#criando-seções-maiores-ou-menores)). Por padrão, fullPage.js rola para o topo se você vier de uma seção acima do destino e para baixo se você vier de uma seção abaixo do destino. Os valores possíveis são `top`, `bottom`, `null`.
473474

475+
### adjustOnNavChange
476+
(padrão `true`)
477+
Define se o fullPage.js ajusta a altura das seções quando a barra de navegação ou a barra de endereço no celular muda de tamanho ou alterna sua visibilidade. Se definido como false, as seções não aparecerão com altura total quando a barra de navegação encolher ou desaparecer.
478+
474479
### keyboardScrolling:
475480
(padrão `true`) Define se o conteúdo pode ser navegado usando o teclado.
476481

lang/chinese/README.md

+6-1
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.32,2-brightgreen.svg)
21+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33,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)
@@ -218,6 +218,7 @@ var myFullpage = new fullpage('#fullpage', {
218218
scrollOverflowReset: false,
219219
touchSensitivity: 15,
220220
bigSectionsDestination: null,
221+
adjustOnNavChange: true,
221222

222223
// 可访问
223224
keyboardScrolling: true,
@@ -466,6 +467,10 @@ new fullpage('#fullpage', {
466467
### bigSectionsDestination
467468
(默认 `null`[示例](https://codepen.io/alvarotrigo/pen/vYLdMrx) 定义如何滚动到超出视图的 section。 默认情况下,如果此section 在目标视图的顶部,fullPage.js 将滚动到顶部,如果此 section 在目标视图的底部,则会滚动到底部。 可选的值是 `top``bottom``null`
468469

470+
### adjustOnNavChange
471+
((默认 `true`)
472+
定义当移动设备上的导航栏或地址栏更改大小或切换可见性时,fullPage.js 是否调整部分的高度。如果设置为 `false`,当导航栏缩小或隐藏时,部分将不会显示为全高度。
473+
469474
### keyboardScrolling
470475
(默认为 `true` )定义是否可以使用键盘进行内容滑动。
471476

lang/french/README.md

+5-1
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.32-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33-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)
@@ -226,6 +226,7 @@ var myFullpage = new fullpage('#fullpage', {
226226
scrollOverflowReset: false,
227227
touchSensitivity: 15,
228228
bigSectionsDestination: null,
229+
adjustOnNavChange: true,
229230

230231
// Accessibilité
231232
keyboardScrolling: true,
@@ -474,6 +475,9 @@ new fullpage('#fullpage', {
474475
### bigSectionsDestination
475476
(défaut `null`) Définit comment faire défiler jusqu'à une section dont la taille est supérieure à celle de la fenêtre. Par défaut, fullPage.js fait défiler vers le haut si vous venez d'une section située au-dessus de celle de destination et vers le bas si vous venez d'une section située au-dessous de celle de destination. Les valeurs possibles sont `haut`,`bas` et `null`.
476477

478+
### adjustOnNavChange
479+
(défaut `true`)
480+
Définit si fullPage.js ajuste la hauteur des sections lorsque la barre de navigation ou la barre d'adresse mobile change de taille ou alterne sa visibilité. Si défini sur `false`, les sections n’apparaîtront pas en pleine hauteur lorsque la barre de navigation se réduit ou disparaît.
477481

478482
### KeyboardScrolling
479483
(défaut `true`) Définit si le contenu peut être navigué à l'aide du clavier.

lang/japanese/README.md

+6-1
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.32-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33-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)
@@ -227,6 +227,7 @@ var myFullpage = new fullpage('#fullpage', {
227227
scrollOverflowReset: false,
228228
touchSensitivity: 15,
229229
bigSectionsDestination: null,
230+
adjustOnNavChange: true,
230231

231232
// アクセシビリティ
232233
keyboardScrolling: true,
@@ -538,6 +539,10 @@ new fullpage('#fullpage', {
538539
デフォルトでは、目的のセクションが上から来る場合は上部にスクロールし、下から来る場合は下部にスクロールします。
539540
可能な値は`top``bottom``null`です。
540541

542+
### adjustOnNavChange
543+
(デフォルト `true`
544+
モバイルのナビゲーションバーやアドレスバーのサイズが変更されたり、表示/非表示が切り替わったときに、fullPage.jsがセクションの高さを調整するかどうかを定義します。`false` に設定すると、ナビゲーションバーが縮小または非表示になった際にセクションが全高で表示されなくなります。
545+
541546
### keyboardScrolling
542547

543548
(デフォルト `true`)キーボードを使用してコンテンツをナビゲートできるかどうかを定義します。

lang/korean/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</p>
1919
---
2020

21-
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.32-brightgreen.svg)
21+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33-brightgreen.svg)
2222
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2323
[![PayPal](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)
@@ -213,6 +213,7 @@ new fullpage('#fullpage', {
213213
scrollOverflowReset: false,
214214
touchSensitivity: 15,
215215
bigSectionsDestination: null,
216+
adjustOnNavChange: true,
216217

217218
// 접근성
218219
keyboardScrolling: true,
@@ -455,6 +456,10 @@ new fullpage('#fullpage', {
455456
### bigSectionsDestination
456457
(기본값 `null`) [데모](https://codepen.io/alvarotrigo/pen/vYLdMrx) 모바일 지원(viewport)보다 더 큰 구역으로 어떻게 스크롤하는지 정의합니다. 기본 설정시 fullPage.js는 목적지 위에 있는 구역에서 내려오는 경우 상위로 스크롤하고 목적지 아래에 있는 구역에서 올라오는 경우 하위로 스크롤합니다. `top`, `bottom`, `null` 값이 가능합니다.
457458

459+
### adjustOnNavChange
460+
(기본값 `true`)
461+
fullPage.js가 모바일 네비게이션 또는 주소창의 크기가 변경되거나 표시 여부가 전환될 때 섹션의 높이를 조정할지 여부를 정의합니다. `false` 로 설정하면, 네비게이션 바가 축소되거나 숨겨질 때 섹션이 전체 높이로 나타나지 않습니다.
462+
458463
### keyboardScrolling
459464
(기본값 `true`) 키보드를 써서 컨텐츠 사이를 이동할 수 있는지 정의합니다.
460465

lang/russian/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
---
2121

22-
![Версия fullPage.js](https://img.shields.io/badge/fullPage.js-v4.0.32-brightgreen.svg)
22+
![Версия fullPage.js](https://img.shields.io/badge/fullPage.js-v4.0.33-brightgreen.svg)
2323
[![Лицензия](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2424
[![Перечисление на PayPal](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)
@@ -218,6 +218,7 @@ var myFullpage = new fullpage('#fullpage', {
218218
scrollOverflowReset: false,
219219
touchSensitivity: 15,
220220
bigSectionsDestination: null,
221+
adjustOnNavChange: true,
221222

222223
// Доступ
223224
keyboardScrolling: true,
@@ -465,6 +466,11 @@ new fullpage('#fullpage', {
465466
### bigSectionsDestination
466467
(по умолчанию `null`) [Демо](https://codepen.io/alvarotrigo/pen/vYLdMrx) Определяет, как должна осуществляться прокрутка к разделу, размер которого превышает размер окна просмотра. По умолчанию fullPage.js пролистывает вверх, если вы попадаете из раздела над заданным, и вниз, если вы попадаете из раздела под заданным. Возможные значения: `top`, `bottom`, `null`.
467468

469+
### adjustOnNavChange
470+
(по умолчанию `true`)
471+
Определяет, будет ли fullPage.js изменять высоту секций при изменении размера или переключении видимости мобильной навигационной панели или адресной строки. Если установить значение `false`, секции не будут отображаться на всю высоту, когда панель навигации уменьшается или скрывается.
472+
473+
468474
### keyboardScrolling
469475
(по умолчанию `true`) Определяет возможность навигации на сайте при помощи клавиатуры.
470476

lang/spanish/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
---
2222

23-
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.32-brightgreen.svg)
23+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.33-brightgreen.svg)
2424
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
2525
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
2626
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)
@@ -223,6 +223,7 @@ new fullpage('#fullpage', {
223223
scrollOverflowReset: false,
224224
touchSensitivity: 15,
225225
bigSectionsfDestination: null,
226+
adjustOnNavChange: true,
226227

227228
// Accesibilidad
228229
keyboardScrolling: true,
@@ -469,6 +470,10 @@ Otras librerías puede ser usadas si se desea.
469470
### bigSectionsDestination
470471
(por defecto `null`) [Demo](https://codepen.io/alvarotrigo/pen/vYLdMrx) Determina cómo desplazarse hacia una sección mayor que la ventana del navegador. Por defecto fullPage.js se desplazará hacia la parte superior de la sección si llegas desde una sección situada por encima y hacia la parte inferior si llegas desde una sección situada por debajo. Los posibles valores para esta opción son: `top`, `bottom`, `null`.
471472

473+
### adjustOnNavChange
474+
(por defecto `true`)
475+
Define si fullPage.js ajusta la altura de las secciones cuando la barra de navegación o la barra de direcciones en móviles cambia de tamaño o alterna su visibilidad. Si se usa `false`, las secciones no aparecerán con altura completa cuando la barra de navegación se reduzca o se oculte.
476+
472477
### keyboardScrolling
473478
(por defecto `true`) Determina si el contenido puede ser navegado usando el teclado.
474479

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fullpage.js",
3-
"version": "4.0.32",
3+
"version": "4.0.33",
44
"description": "Create beautiful fullscreen snap scrolling websites",
55
"main": "dist/fullpage.js",
66
"scripts": {

rollup.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import resolve from "@rollup/plugin-node-resolve";
33
import babel from "@rollup/plugin-babel";
44

55
const licenseContent = `/*!
6-
* fullPage 4.0.32
6+
* fullPage 4.0.33
77
* https://github.com/alvarotrigo/fullPage.js
88
*
99
* @license GPLv3 for open source use only
@@ -68,6 +68,7 @@ const terserOptions = {
6868
'skipIntermediateItems',
6969
'touchWrapper',
7070
'bigSectionsDestination',
71+
'adjustOnNavChange',
7172
'keyboardScrolling',
7273
'animateAnchor',
7374
'recordHistory',

src/css/fullpage.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.32
2+
* fullPage 4.0.33
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only

src/js/arrows.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ function onClickOrTouch(params){
2929
function slideArrowHandler(){
3030
/*jshint validthis:true */
3131
var section = utils.closest(this, SECTION_SEL);
32+
var isPrevArrow = utils.hasClass(this, SLIDES_PREV) || utils.closest(this, SLIDES_PREV);
3233

3334
/*jshint validthis:true */
34-
if (utils.closest(this, SLIDES_PREV)) {
35+
if (isPrevArrow) {
3536
if(getIsScrollAllowed().m.left){
3637
setState({scrollTrigger: 'slideArrow'});
3738
EventEmitter.emit(events.moveSlideLeft, {section: section});

src/js/fullpage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function setAPI(){
6565
};
6666

6767
//public functions
68-
FP.version = '4.0.32';
68+
FP.version = '4.0.33';
6969

7070
FP.test = Object.assign(FP.test, {
7171
top: '0px',

0 commit comments

Comments
 (0)