Skip to content

Commit

Permalink
Merge pull request #4648 from alvarotrigo/dev
Browse files Browse the repository at this point in the history
Merging dev branch 4.0.27
  • Loading branch information
alvarotrigo committed Aug 19, 2024
2 parents 84f0758 + f78fea5 commit d0cd888
Show file tree
Hide file tree
Showing 27 changed files with 854 additions and 266 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

---

![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.26-brightgreen.svg)
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-brightgreen.svg)
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)
Expand Down Expand Up @@ -220,6 +220,7 @@ var myFullpage = new fullpage('#fullpage', {
scrollOverflow: true,
scrollOverflowMacStyle: false,
scrollOverflowReset: false,
skipIntermediateItems: false,
touchSensitivity: 15,
bigSectionsDestination: null,

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

(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

## skipIntermediateItems

(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.

### continuousVertical

(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`).
Expand Down
2 changes: 1 addition & 1 deletion dist/fullpage.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* fullPage 4.0.26
* fullPage 4.0.27
* https://github.com/alvarotrigo/fullPage.js
*
* @license GPLv3 for open source use only
Expand Down
4 changes: 2 additions & 2 deletions dist/fullpage.extensions.min.js

Large diffs are not rendered by default.

35 changes: 29 additions & 6 deletions dist/fullpage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* fullPage 4.0.26
* fullPage 4.0.27
* https://github.com/alvarotrigo/fullPage.js
*
* @license GPLv3 for open source use only
Expand Down Expand Up @@ -1155,6 +1155,7 @@
normalScrollElements: null,
scrollOverflow: true,
scrollOverflowReset: false,
skipIntermediateItems: false,
touchSensitivity: 5,
touchWrapper: null,
bigSectionsDestination: null,
Expand Down Expand Up @@ -2583,13 +2584,13 @@


function performMovement(v) {
var isFastSpeed = getOptions().scrollingSpeed < 700;
var transitionLapse = isFastSpeed ? 700 : getOptions().scrollingSpeed;
setState({
touchDirection: 'none',
scrollY: Math.round(v.dtop)
});
EventEmitter.emit(events.onPerformMovement); // using CSS3 translate functionality
EventEmitter.emit(events.onPerformMovement, v);
var isFastSpeed = getOptions().scrollingSpeed < 700;
var transitionLapse = isFastSpeed ? 700 : getOptions().scrollingSpeed; // using CSS3 translate functionality

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

Expand All @@ -5525,6 +5526,28 @@
}
}();

EventEmitter.on(events.onPerformMovement, onSlideOrScroll);
EventEmitter.on(events.afterSectionLoads, afterPanelLoad);
EventEmitter.on(events.onSlideLeave, onSlideOrScroll);
EventEmitter.on(events.afterSlideLoads, afterPanelLoad);

function onSlideOrScroll(params) {
var skipValue = getOptions().skipIntermediateItems;
var scrollType = params.items.origin.isSection ? 'sections' : 'slides';
var areConsecutivePanels = Math.abs(params.items.origin.index() - params.items.destination.index()) > 1;
var doesApply = (skipValue === true || skipValue === scrollType) && areConsecutivePanels;

if (doesApply) {
setScrollingSpeed(0, 'internal');
}
}

function afterPanelLoad(params) {
if (getOptions().skipIntermediateItems) {
setVariableState('scrollingSpeed', getOriginals().scrollingSpeed, 'internal');
}
}

//@ts-check
EventEmitter.on(events.beforeInit, beforeInit);
FP.setKeyboardScrolling = setKeyboardScrolling;
Expand Down Expand Up @@ -5946,7 +5969,7 @@
}; //public functions


FP.version = '4.0.26';
FP.version = '4.0.27';
FP.test = Object.assign(FP.test, {
top: '0px',
translate3d: 'translate3d(0px, 0px, 0px)',
Expand Down
2 changes: 1 addition & 1 deletion dist/fullpage.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/fullpage.min.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/fullpage.min.js

Large diffs are not rendered by default.

146 changes: 146 additions & 0 deletions examples/skipIntermediateItems.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Skip Intermediate Slides or Sections - fullPage.js</title>
<meta name="author" content="Alvaro Trigo Lopez" />
<meta name="description" content="fullPage - Skip Intermediate sections and slides. Jump non consecutive siblings without animation." />
<meta name="keywords" content="fullpage,jquery,demo,skipIntermediateItems,skip,ignore,jump,inmediate,siblings" />
<meta name="Resource-type" content="Document" />

<link rel="stylesheet" type="text/css" href="../dist/fullpage.css" />
<link rel="stylesheet" type="text/css" href="examples.css" />
<style>

/* Style for our header texts
* --------------------------------------- */
h1{
font-size: 5em;
font-family: arial,helvetica;
color: #fff;
margin:0;
}
.intro p{
color: #fff;
}

/* Centered texts in each section
* --------------------------------------- */
.section{
text-align:center;
}


/* Bottom menu
* --------------------------------------- */
#infoMenu li a {
color: #fff;
}
</style>

<!--[if IE]>
<script type="text/javascript">
var console = { log: function() {} };
</script>
<![endif]-->
</head>
<body>

<select id="demosMenu">
<option selected>Choose Demo</option>
<option id="simple">Simple</option>
<option id="custom-arrows">Custom arrows</option>
<option id="hide-sections">Hide sections</option>
<option id="scroll-after-fullpage">Scroll after fullpage</option>
<option id="observer">Observer</option>
<option id="jquery-adapter">jQuery adapter</option>
<option id="active-slide">Active section and slide</option>
<option id="auto-height">Auto height</option>
<option id="autoplay-video-and-audio">Autoplay Video and Audio</option>
<option id="backgrounds">Background images</option>
<option id="backgrounds-fixed">Fixed fullscreen backgrounds</option>
<option id="background-video">Background video</option>
<option id="callbacks">Callbacks</option>
<option id="continuous-horizontal">Continuous horizontal (premium)</option>
<option id="continuous-vertical">Continuous vertical</option>
<option id="parallax">Parallax (premium)</option>
<option id="cards">Cards 3d (premium)</option>
<option id="water-effect">Water effect (premium)</option>
<option id="drop-effect">Drop effect (premium)</option>
<option id="css3">CSS3</option>
<option id="drag-and-move">Drag And Move (premium)</option>
<option id="easing-css3">Easing CSS</option>
<option id="easing-js">Easing JS</option>
<option id="fading-effect">Fading Effect (premium)</option>
<option id="fixed-headers">Fixed headers</option>
<option id="gradient-backgrounds">Gradient backgrounds</option>
<option id="interlocked-slides">Interlocked Slides (premium)</option>
<option id="looping">Looping</option>
<option id="methods">Methods</option>
<option id="navigation-vertical">Vertical navigation dots</option>
<option id="navigation-horizontal">Horizontal navigation dots</option>
<option id="navigation-tooltips">Navigation tooltips</option>
<option id="no-anchor">No anchor links</option>
<option id="normal-scroll">Normal scrolling</option>
<option id="normalScrollElements">Normal scroll elements</option>
<option id="offset-sections">Offset sections (premium)</option>
<option id="one-section">One single section</option>
<option id="reset-sliders">Reset sliders (premium)</option>
<option id="responsive-auto-height">Responsive Auto Height</option>
<option id="responsive-height">Responsive Height</option>
<option id="responsive-width">Responsive Width</option>
<option id="responsive-slides">Responsive Slides (premium)</option>
<option id="scrollBar">Scroll bar enabled</option>
<option id="scroll-horizontally">Scroll horizontally (premium)</option>
<option id="scrollOverflow">Scroll inside sections and slides</option>
<option id="scrollOverflow-reset">ScrollOverflow Reset (premium)</option>
<option id="lazy-load">Lazy load</option>
<option id="scrolling-speed">Scrolling speed</option>
<option id="trigger-animations">Trigger animations</option>
<option id="vue-fullpage">Vue component</option>
<option id="react-fullpage">React component</option>
<option id="angular-fullpage">Angular component</option>
</select>


<div id="fullpage">
<div class="section">
<h1>Section 1</h1>
</div>
<div class="section">
<div class="slide"><h1>Slide 2.1</h1></div>
<div class="slide"><h1>Slide 2.2</h1></div>
<div class="slide"><h1>Slide 2.3</h1></div>
<div class="slide"><h1>Slide 2.4</h1></div>
</div>
<div class="section">
<h1>Section 3</h1>
</div>
<div class="section">
<h1>Section 4</h1>
</div>
</div>

<script type="text/javascript" src="../dist/fullpage.min.js"></script>
<script type="text/javascript" src="examples.js"></script>

<script type="text/javascript">
var myFullpage = new fullpage('#fullpage', {
anchors: ['firstPage', 'secondPage', '3rdPage'],
sectionsColor: ['#C63D0F', '#1BBC9B', '#7E8F7C', 'orange'],
navigation: true,
slidesNavigation: true,

// default is false
skipIntermediateItems: true

// possible values
// skipIntermediateItems: 'slides'
// skipIntermediateItems: 'sections'
// skipIntermediateItems: false
});
</script>

</body>
</html>
5 changes: 4 additions & 1 deletion lang/brazilian-portuguese/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

---

![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.26-brightgreen.svg)
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-brightgreen.svg)
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)
Expand Down Expand Up @@ -476,6 +476,9 @@ the fitting by the configured milliseconds.
### touchSensitivity:
(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

## skipIntermediateItems
(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.

### continuousVertical:
(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`).

Expand Down
5 changes: 4 additions & 1 deletion lang/chinese/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

---

![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.26,2-brightgreen.svg)
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27,2-brightgreen.svg)
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)
Expand Down Expand Up @@ -471,6 +471,9 @@ new fullpage('#fullpage', {
### touchSensitivity
(默认 `5`)定义浏览器窗口宽度/高度的百分比,和触发滑动到下一个 section/slide 的距离的灵敏度。

## skipIntermediateItems
(默认值 `false`)。确定在导航非连续的垂直部分或水平幻灯片时是否跳过滚动动画。可能的值包括 `true``false``sections``slides`,允许您将此行为应用于垂直方向、 水平方向或两个方向。

### continuousVertical
(默认为 `false`)定义首位链接循环(最后一个 section 向下滚动,滚动到第一个section,或第一个 section 向上滚动时滚动到最后一个 section )。 不兼容 `loopTop``loopBottom` 或站点中存在的任何滚动条(`scrollBar:true``autoScrolling:false` )。

Expand Down
5 changes: 4 additions & 1 deletion lang/french/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

---

![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.26-brightgreen.svg)
![fullPage.js version](https://img.shields.io/badge/fullPage.js-v4.0.27-brightgreen.svg)
[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)
Expand Down Expand Up @@ -480,6 +480,9 @@ new fullpage('#fullpage', {
### touchSensitivity
(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

## skipIntermediateItems
(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.

### continuousVertical
(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`).

Expand Down
Loading

0 comments on commit d0cd888

Please sign in to comment.