Skip to content

Commit d0cd888

Browse files
authored
Merge pull request #4648 from alvarotrigo/dev
Merging dev branch 4.0.27
2 parents 84f0758 + f78fea5 commit d0cd888

27 files changed

+854
-266
lines changed

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.26-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-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)
@@ -220,6 +220,7 @@ var myFullpage = new fullpage('#fullpage', {
220220
scrollOverflow: true,
221221
scrollOverflowMacStyle: false,
222222
scrollOverflowReset: false,
223+
skipIntermediateItems: false,
223224
touchSensitivity: 15,
224225
bigSectionsDestination: null,
225226

@@ -500,6 +501,10 @@ It requires the file `vendors/easings.min.js` or [jQuery UI](https://jqueryui.co
500501

501502
(default `5`) Defines a percentage of the browsers window width/height, and how far a swipe must measure for navigating to the next section / slide
502503

504+
## skipIntermediateItems
505+
506+
(default `false`). Determines whether to skip the scroll animation when navigating between non-consecutive vertical sections or horizontal slides. The possible values are `true`, `false`, `sections`, and `slides`, allowing you to apply this behavior vertically, horizontally, or in both directions.
507+
503508
### continuousVertical
504509

505510
(default `false`) Defines whether scrolling down in the last section should scroll down to the first one and if scrolling up in the first section should scroll up to the last one. Not compatible with `loopTop`, `loopBottom` or any scroll bar present in the site (`scrollBar:true` or `autoScrolling:false`).

dist/fullpage.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.26
2+
* fullPage 4.0.27
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

+29-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 4.0.26
2+
* fullPage 4.0.27
33
* https://github.com/alvarotrigo/fullPage.js
44
*
55
* @license GPLv3 for open source use only
@@ -1155,6 +1155,7 @@
11551155
normalScrollElements: null,
11561156
scrollOverflow: true,
11571157
scrollOverflowReset: false,
1158+
skipIntermediateItems: false,
11581159
touchSensitivity: 5,
11591160
touchWrapper: null,
11601161
bigSectionsDestination: null,
@@ -2583,13 +2584,13 @@
25832584

25842585

25852586
function performMovement(v) {
2586-
var isFastSpeed = getOptions().scrollingSpeed < 700;
2587-
var transitionLapse = isFastSpeed ? 700 : getOptions().scrollingSpeed;
25882587
setState({
25892588
touchDirection: 'none',
25902589
scrollY: Math.round(v.dtop)
25912590
});
2592-
EventEmitter.emit(events.onPerformMovement); // using CSS3 translate functionality
2591+
EventEmitter.emit(events.onPerformMovement, v);
2592+
var isFastSpeed = getOptions().scrollingSpeed < 700;
2593+
var transitionLapse = isFastSpeed ? 700 : getOptions().scrollingSpeed; // using CSS3 translate functionality
25932594

25942595
if (getOptions().css3 && getOptions().autoScrolling && !getOptions().scrollBar) {
25952596
// The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625
@@ -5507,7 +5508,7 @@
55075508
});
55085509
});
55095510
var t = ["-"];
5510-
var n = "\x32\x30\x32\x34\x2d\x36\x2d\x32\x33".split("-"),
5511+
var n = "\x32\x30\x32\x34\x2d\x37\x2d\x31\x39".split("-"),
55115512
e = new Date(n[0], n[1], n[2]),
55125513
r = ["se", "licen", "-", "v3", "l", "gp"];
55135514

@@ -5525,6 +5526,28 @@
55255526
}
55265527
}();
55275528

5529+
EventEmitter.on(events.onPerformMovement, onSlideOrScroll);
5530+
EventEmitter.on(events.afterSectionLoads, afterPanelLoad);
5531+
EventEmitter.on(events.onSlideLeave, onSlideOrScroll);
5532+
EventEmitter.on(events.afterSlideLoads, afterPanelLoad);
5533+
5534+
function onSlideOrScroll(params) {
5535+
var skipValue = getOptions().skipIntermediateItems;
5536+
var scrollType = params.items.origin.isSection ? 'sections' : 'slides';
5537+
var areConsecutivePanels = Math.abs(params.items.origin.index() - params.items.destination.index()) > 1;
5538+
var doesApply = (skipValue === true || skipValue === scrollType) && areConsecutivePanels;
5539+
5540+
if (doesApply) {
5541+
setScrollingSpeed(0, 'internal');
5542+
}
5543+
}
5544+
5545+
function afterPanelLoad(params) {
5546+
if (getOptions().skipIntermediateItems) {
5547+
setVariableState('scrollingSpeed', getOriginals().scrollingSpeed, 'internal');
5548+
}
5549+
}
5550+
55285551
//@ts-check
55295552
EventEmitter.on(events.beforeInit, beforeInit);
55305553
FP.setKeyboardScrolling = setKeyboardScrolling;
@@ -5946,7 +5969,7 @@
59465969
}; //public functions
59475970

59485971

5949-
FP.version = '4.0.26';
5972+
FP.version = '4.0.27';
59505973
FP.test = Object.assign(FP.test, {
59515974
top: '0px',
59525975
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.

examples/skipIntermediateItems.html

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6+
<title>Skip Intermediate Slides or Sections - fullPage.js</title>
7+
<meta name="author" content="Alvaro Trigo Lopez" />
8+
<meta name="description" content="fullPage - Skip Intermediate sections and slides. Jump non consecutive siblings without animation." />
9+
<meta name="keywords" content="fullpage,jquery,demo,skipIntermediateItems,skip,ignore,jump,inmediate,siblings" />
10+
<meta name="Resource-type" content="Document" />
11+
12+
<link rel="stylesheet" type="text/css" href="../dist/fullpage.css" />
13+
<link rel="stylesheet" type="text/css" href="examples.css" />
14+
<style>
15+
16+
/* Style for our header texts
17+
* --------------------------------------- */
18+
h1{
19+
font-size: 5em;
20+
font-family: arial,helvetica;
21+
color: #fff;
22+
margin:0;
23+
}
24+
.intro p{
25+
color: #fff;
26+
}
27+
28+
/* Centered texts in each section
29+
* --------------------------------------- */
30+
.section{
31+
text-align:center;
32+
}
33+
34+
35+
/* Bottom menu
36+
* --------------------------------------- */
37+
#infoMenu li a {
38+
color: #fff;
39+
}
40+
</style>
41+
42+
<!--[if IE]>
43+
<script type="text/javascript">
44+
var console = { log: function() {} };
45+
</script>
46+
<![endif]-->
47+
</head>
48+
<body>
49+
50+
<select id="demosMenu">
51+
<option selected>Choose Demo</option>
52+
<option id="simple">Simple</option>
53+
<option id="custom-arrows">Custom arrows</option>
54+
<option id="hide-sections">Hide sections</option>
55+
<option id="scroll-after-fullpage">Scroll after fullpage</option>
56+
<option id="observer">Observer</option>
57+
<option id="jquery-adapter">jQuery adapter</option>
58+
<option id="active-slide">Active section and slide</option>
59+
<option id="auto-height">Auto height</option>
60+
<option id="autoplay-video-and-audio">Autoplay Video and Audio</option>
61+
<option id="backgrounds">Background images</option>
62+
<option id="backgrounds-fixed">Fixed fullscreen backgrounds</option>
63+
<option id="background-video">Background video</option>
64+
<option id="callbacks">Callbacks</option>
65+
<option id="continuous-horizontal">Continuous horizontal (premium)</option>
66+
<option id="continuous-vertical">Continuous vertical</option>
67+
<option id="parallax">Parallax (premium)</option>
68+
<option id="cards">Cards 3d (premium)</option>
69+
<option id="water-effect">Water effect (premium)</option>
70+
<option id="drop-effect">Drop effect (premium)</option>
71+
<option id="css3">CSS3</option>
72+
<option id="drag-and-move">Drag And Move (premium)</option>
73+
<option id="easing-css3">Easing CSS</option>
74+
<option id="easing-js">Easing JS</option>
75+
<option id="fading-effect">Fading Effect (premium)</option>
76+
<option id="fixed-headers">Fixed headers</option>
77+
<option id="gradient-backgrounds">Gradient backgrounds</option>
78+
<option id="interlocked-slides">Interlocked Slides (premium)</option>
79+
<option id="looping">Looping</option>
80+
<option id="methods">Methods</option>
81+
<option id="navigation-vertical">Vertical navigation dots</option>
82+
<option id="navigation-horizontal">Horizontal navigation dots</option>
83+
<option id="navigation-tooltips">Navigation tooltips</option>
84+
<option id="no-anchor">No anchor links</option>
85+
<option id="normal-scroll">Normal scrolling</option>
86+
<option id="normalScrollElements">Normal scroll elements</option>
87+
<option id="offset-sections">Offset sections (premium)</option>
88+
<option id="one-section">One single section</option>
89+
<option id="reset-sliders">Reset sliders (premium)</option>
90+
<option id="responsive-auto-height">Responsive Auto Height</option>
91+
<option id="responsive-height">Responsive Height</option>
92+
<option id="responsive-width">Responsive Width</option>
93+
<option id="responsive-slides">Responsive Slides (premium)</option>
94+
<option id="scrollBar">Scroll bar enabled</option>
95+
<option id="scroll-horizontally">Scroll horizontally (premium)</option>
96+
<option id="scrollOverflow">Scroll inside sections and slides</option>
97+
<option id="scrollOverflow-reset">ScrollOverflow Reset (premium)</option>
98+
<option id="lazy-load">Lazy load</option>
99+
<option id="scrolling-speed">Scrolling speed</option>
100+
<option id="trigger-animations">Trigger animations</option>
101+
<option id="vue-fullpage">Vue component</option>
102+
<option id="react-fullpage">React component</option>
103+
<option id="angular-fullpage">Angular component</option>
104+
</select>
105+
106+
107+
<div id="fullpage">
108+
<div class="section">
109+
<h1>Section 1</h1>
110+
</div>
111+
<div class="section">
112+
<div class="slide"><h1>Slide 2.1</h1></div>
113+
<div class="slide"><h1>Slide 2.2</h1></div>
114+
<div class="slide"><h1>Slide 2.3</h1></div>
115+
<div class="slide"><h1>Slide 2.4</h1></div>
116+
</div>
117+
<div class="section">
118+
<h1>Section 3</h1>
119+
</div>
120+
<div class="section">
121+
<h1>Section 4</h1>
122+
</div>
123+
</div>
124+
125+
<script type="text/javascript" src="../dist/fullpage.min.js"></script>
126+
<script type="text/javascript" src="examples.js"></script>
127+
128+
<script type="text/javascript">
129+
var myFullpage = new fullpage('#fullpage', {
130+
anchors: ['firstPage', 'secondPage', '3rdPage'],
131+
sectionsColor: ['#C63D0F', '#1BBC9B', '#7E8F7C', 'orange'],
132+
navigation: true,
133+
slidesNavigation: true,
134+
135+
// default is false
136+
skipIntermediateItems: true
137+
138+
// possible values
139+
// skipIntermediateItems: 'slides'
140+
// skipIntermediateItems: 'sections'
141+
// skipIntermediateItems: false
142+
});
143+
</script>
144+
145+
</body>
146+
</html>

lang/brazilian-portuguese/README.md

+4-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.26-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-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)
@@ -476,6 +476,9 @@ the fitting by the configured milliseconds.
476476
### touchSensitivity:
477477
(padrão `5`) Define uma porcentagem da largura/altura da janela do navegador e a distância que um deslize deve medir para navegar para a próxima seção/slide
478478

479+
## skipIntermediateItems
480+
(padrão `false`). Determina se a animação de rolagem deve ser ignorada ao navegar entre seções verticais ou slides horizontais não consecutivos. Os valores possíveis são `true`, `false`, `sections` e `slides`, permitindo aplicar esse comportamento verticalmente, horizontalmente ou em ambas as direções.
481+
479482
### continuousVertical:
480483
(padrão `false`) Define se a rolagem para baixo na última seção deve rolar para a primeira e se a rolagem para cima na primeira seção deve rolar para a última. Não compatível com `loopTop`, `loopBottom` ou qualquer barra de rolagem presente no site (`scrollBar:true` ou `autoScrolling:false`).
481484

lang/chinese/README.md

+4-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.26,2-brightgreen.svg)
21+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27,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)
@@ -471,6 +471,9 @@ new fullpage('#fullpage', {
471471
### touchSensitivity
472472
(默认 `5`)定义浏览器窗口宽度/高度的百分比,和触发滑动到下一个 section/slide 的距离的灵敏度。
473473

474+
## skipIntermediateItems
475+
(默认值 `false`)。确定在导航非连续的垂直部分或水平幻灯片时是否跳过滚动动画。可能的值包括 `true``false``sections``slides`,允许您将此行为应用于垂直方向、 水平方向或两个方向。
476+
474477
### continuousVertical
475478
(默认为 `false`)定义首位链接循环(最后一个 section 向下滚动,滚动到第一个section,或第一个 section 向上滚动时滚动到最后一个 section )。 不兼容 `loopTop``loopBottom` 或站点中存在的任何滚动条(`scrollBar:true``autoScrolling:false` )。
476479

lang/french/README.md

+4-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.26-brightgreen.svg)
22+
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-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)
@@ -480,6 +480,9 @@ new fullpage('#fullpage', {
480480
### touchSensitivity
481481
(défaut `5`) Définit un pourcentage de la largeur/hauteur de la fenêtre du navigateur, et la distance que doit mesurer un glissement pour naviguer vers la section / diapositive suivante
482482

483+
## skipIntermediateItems
484+
(valeur par défaut `false`). Détermine s'il faut ignorer l'animation de défilement lors de la navigation entre des sections verticales ou des diapositives horizontales non consécutives. Les valeurs possibles sont `true`, `false`, `sections` et `slides`, permettant d'appliquer ce comportement verticalement, horizontalement ou dans les deux directions.
485+
483486
### continuousVertical
484487
(défaut `false`) Définit si le défilement vers le bas dans la dernière section ou doit descendre jusqu'à la première et si le défilement vers le haut dans la première section doit monter jusqu'à la dernière. Non compatible avec `loopTop`, `loopBottom` ou toute barre de défilement présente dans le site (`scrollBar:true` ou `autoScrolling:false`).
485488

0 commit comments

Comments
 (0)