Skip to content

Commit 09f9b69

Browse files
committed
- Updading version and dist files
1 parent 2ff7d78 commit 09f9b69

10 files changed

+87
-94
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<a href="https://github.com/alvarotrigo/fullPage.js"><img src="https://raw.githubusercontent.com/alvarotrigo/fullPage.js/dev/examples/imgs/en-language.png" /></a><a href="https://github.com/alvarotrigo/fullPage.js/blob/dev/README_SPANISH.md#fullpagejs"><img src="https://raw.githubusercontent.com/alvarotrigo/fullPage.js/dev/examples/imgs/es-language-inactive.png" /></a>
88
</p>
99

10-
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.8.8-brightgreen.svg)
10+
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.8.9-brightgreen.svg)
1111
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
1212
7Kb gziped!
1313

@@ -396,7 +396,7 @@ the fitting by the configured milliseconds.
396396

397397
- `interlockedSlides`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Determines whether moving one horizontal slider will force the sliding of sliders in other section in the same direction. Possible values are `true`, `false` or an array with the interlocked sections. For example `[1,3,5]` starting by 1. Requires fullpage.js >= 2.8.3.
398398

399-
- `dragAndMove`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Enables or disables the dragging and flicking of sections and slides by using mouse or fingers. Possible values are `true`, `false`, `fingersonly`.
399+
- `dragAndMove`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Enables or disables the dragging and flicking of sections and slides by using mouse or fingers. Possible values are `true`, `false`, `fingersonly`. Requires fullPage.js >= 2.8.9.
400400

401401
- `offsetSections`: (default `false`)[Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Provides a way to use non full screen sections based on percentage. Ideal to show visitors there's more content in the site by showing part of the next or previous section. Requires fullPage.js >= 2.8.8
402402
To define the percentage of each section the attribute `data-percentage` must be used. The centering of the section in the viewport can be determined by using a boolean value in the attribute `data-centered` (default to `true` if not specified). For example:

dist/jquery.fullpage.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 2.8.8
2+
* fullPage 2.8.9
33
* https://github.com/alvarotrigo/fullPage.js
44
* MIT licensed
55
*

dist/jquery.fullpage.extensions.min.js

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

dist/jquery.fullpage.js

Lines changed: 67 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* fullPage 2.8.8
2+
* fullPage 2.8.9
33
* https://github.com/alvarotrigo/fullPage.js
44
* @license MIT licensed
55
*
@@ -138,6 +138,8 @@
138138
continuousHorizontal: false,
139139
scrollHorizontally: false,
140140
interlockedSlides: false,
141+
dragAndMove: false,
142+
offsetSections: false,
141143
resetSliders: false,
142144
fadingEffect: false,
143145
normalScrollElements: null,
@@ -314,7 +316,7 @@
314316
}
315317

316318
/**
317-
* Adds or remove the possiblity of scrolling through sections by using the mouse wheel/trackpad or touch gestures.
319+
* Adds or remove the possibility of scrolling through sections by using the mouse wheel/trackpad or touch gestures.
318320
* Optionally a second parameter can be used to specify the direction for which the action will be applied.
319321
*
320322
* @param directions string containing the direction or directions separated by comma.
@@ -337,7 +339,7 @@
337339
}
338340

339341
/**
340-
* Adds or remove the possiblity of scrolling through sections by using the keyboard arrow keys
342+
* Adds or remove the possibility of scrolling through sections by using the keyboard arrow keys
341343
*/
342344
function setKeyboardScrolling(value, directions){
343345
if(typeof directions !== 'undefined'){
@@ -501,24 +503,6 @@
501503
}
502504
}
503505

504-
function getFullpageData(){
505-
return {
506-
options: options,
507-
internals: {
508-
getXmovement: getXmovement,
509-
removeAnimation: removeAnimation,
510-
getTransforms: getTransforms,
511-
lazyLoad: lazyLoad,
512-
addAnimation: addAnimation,
513-
performHorizontalMove: performHorizontalMove,
514-
silentLandscapeScroll: silentLandscapeScroll,
515-
keepSlidesPosition: keepSlidesPosition,
516-
silentScroll: silentScroll,
517-
styleSlides: styleSlides
518-
}
519-
};
520-
}
521-
522506
if($(this).length){
523507
//public functions
524508
FP.setAutoScrolling = setAutoScrolling;
@@ -537,7 +521,6 @@
537521
FP.moveSlideLeft = moveSlideLeft;
538522
FP.reBuild = reBuild;
539523
FP.setResponsive = setResponsive;
540-
FP.getFullpageData = getFullpageData;
541524
FP.destroy = destroy;
542525

543526
init();
@@ -588,7 +571,7 @@
588571
//(a way to detect back history button as we play with the hashes on the URL)
589572
.on('hashchange', hashChangeHandler)
590573

591-
//when opening a new tab (ctrl + t), `control` won't be pressed when comming back.
574+
//when opening a new tab (ctrl + t), `control` won't be pressed when coming back.
592575
.blur(blurHandler)
593576

594577
//when resizing the site, we adjust the heights of the sections, slimScroll...
@@ -640,7 +623,7 @@
640623
}).get();
641624
}
642625

643-
//no tooltipos option? Checking for them in the DOM attributes
626+
//no tooltips option? Checking for them in the DOM attributes
644627
if(!options.navigationTooltips.length){
645628
options.navigationTooltips = sections.filter('[data-tooltip]').map(function(){
646629
return $(this).data('tooltip').toString();
@@ -649,7 +632,7 @@
649632
}
650633

651634
/**
652-
* Works over the DOM structure to set it up for the current fullpage optionss.
635+
* Works over the DOM structure to set it up for the current fullpage options.
653636
*/
654637
function prepareDom(){
655638
container.css({
@@ -664,7 +647,7 @@
664647
//due to https://github.com/alvarotrigo/fullPage.js/issues/1502
665648
windowsHeight = $window.height();
666649

667-
container.removeClass(DESTROYED); //in case it was destroyed before initilizing it again
650+
container.removeClass(DESTROYED); //in case it was destroyed before initializing it again
668651

669652
addInternalSelectors();
670653

@@ -917,6 +900,7 @@
917900
}
918901
lazyLoad(section);
919902
playMedia(section);
903+
options.scrollOverflowHandler.afterLoad();
920904

921905
$.isFunction( options.afterLoad ) && options.afterLoad.call(section, section.data('anchor'), (section.index(SECTION_SEL) + 1));
922906
$.isFunction( options.afterRender ) && options.afterRender.call(container);
@@ -1090,7 +1074,7 @@
10901074
*/
10911075
function preventBouncing(event){
10921076
var e = event.originalEvent;
1093-
if(options.autoScrolling && isReallyTouch(e)){
1077+
if(!checkParentForNormalScrollElement(event.target) && options.autoScrolling && isReallyTouch(e)){
10941078
//preventing the easing on iOS devices
10951079
event.preventDefault();
10961080
}
@@ -1120,45 +1104,41 @@
11201104
}
11211105

11221106
var scrollable = options.scrollOverflowHandler.scrollable(activeSection);
1107+
var touchEvents = getEventsPage(e);
11231108

1124-
if (canScroll && !slideMoving) { //if theres any #
1125-
var touchEvents = getEventsPage(e);
1126-
1127-
touchEndY = touchEvents.y;
1128-
touchEndX = touchEvents.x;
1129-
1130-
//if movement in the X axys is greater than in the Y and the currect section has slides...
1131-
if (activeSection.find(SLIDES_WRAPPER_SEL).length && Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))) {
1132-
1133-
//is the movement greater than the minimum resistance to scroll?
1134-
if (Math.abs(touchStartX - touchEndX) > ($window.outerWidth() / 100 * options.touchSensitivity)) {
1135-
if (touchStartX > touchEndX) {
1136-
if(isScrollAllowed.m.right){
1137-
moveSlideRight(activeSection); //next
1138-
}
1139-
} else {
1140-
if(isScrollAllowed.m.left){
1141-
moveSlideLeft(activeSection); //prev
1142-
}
1109+
touchEndY = touchEvents.y;
1110+
touchEndX = touchEvents.x;
1111+
1112+
//if movement in the X axys is greater than in the Y and the currect section has slides...
1113+
if (activeSection.find(SLIDES_WRAPPER_SEL).length && Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))) {
1114+
1115+
//is the movement greater than the minimum resistance to scroll?
1116+
if (!slideMoving && Math.abs(touchStartX - touchEndX) > ($window.outerWidth() / 100 * options.touchSensitivity)) {
1117+
if (touchStartX > touchEndX) {
1118+
if(isScrollAllowed.m.right){
1119+
moveSlideRight(activeSection); //next
1120+
}
1121+
} else {
1122+
if(isScrollAllowed.m.left){
1123+
moveSlideLeft(activeSection); //prev
11431124
}
11441125
}
11451126
}
1127+
}
11461128

1147-
//vertical scrolling (only when autoScrolling is enabled)
1148-
else if(options.autoScrolling){
1129+
//vertical scrolling (only when autoScrolling is enabled)
1130+
else if(options.autoScrolling && canScroll){
11491131

1150-
//is the movement greater than the minimum resistance to scroll?
1151-
if (Math.abs(touchStartY - touchEndY) > ($window.height() / 100 * options.touchSensitivity)) {
1152-
if (touchStartY > touchEndY) {
1153-
scrolling('down', scrollable);
1154-
} else if (touchEndY > touchStartY) {
1155-
scrolling('up', scrollable);
1156-
}
1132+
//is the movement greater than the minimum resistance to scroll?
1133+
if (Math.abs(touchStartY - touchEndY) > ($window.height() / 100 * options.touchSensitivity)) {
1134+
if (touchStartY > touchEndY) {
1135+
scrolling('down', scrollable);
1136+
} else if (touchEndY > touchStartY) {
1137+
scrolling('up', scrollable);
11571138
}
11581139
}
11591140
}
11601141
}
1161-
11621142
}
11631143

11641144
/**
@@ -1593,7 +1573,10 @@
15931573
$.isFunction(options.afterLoad) && !v.localIsResizing && options.afterLoad.call(v.element, v.anchorLink, (v.sectionIndex + 1));
15941574
options.scrollOverflowHandler.afterLoad();
15951575

1596-
playMedia(v.element);
1576+
if(!v.localIsResizing){
1577+
playMedia(v.element);
1578+
}
1579+
15971580
v.element.addClass(COMPLETELY).siblings().removeClass(COMPLETELY);
15981581

15991582
canScroll = true;
@@ -1812,7 +1795,7 @@
18121795
}
18131796
}
18141797

1815-
//when opening a new tab (ctrl + t), `control` won't be pressed when comming back.
1798+
//when opening a new tab (ctrl + t), `control` won't be pressed when coming back.
18161799
function blurHandler(){
18171800
isWindowFocused = false;
18181801
controlPressed = false;
@@ -1994,9 +1977,9 @@
19941977
//needs to be inside the condition to prevent problems with continuousVertical and scrollHorizontally
19951978
//and to prevent double scroll right after a windows resize
19961979
canScroll = true;
1997-
}
19981980

1999-
playMedia(v.destiny);
1981+
playMedia(v.destiny);
1982+
}
20001983

20011984
//letting them slide again
20021985
slideMoving = false;
@@ -2649,7 +2632,7 @@
26492632
// that's why we round it to 0.
26502633
var roundedTop = Math.round(top);
26512634

2652-
if(options.scrollBar){
2635+
if(options.scrollBar || !options.autoScrolling){
26532636
container.scrollTop(roundedTop);
26542637
}
26552638
else if (options.css3) {
@@ -2824,7 +2807,7 @@
28242807
* Displays warnings
28252808
*/
28262809
function displayWarnings(){
2827-
var extensions = ['fadingEffect', 'continuousHorizontal', 'scrollHorizontally', 'interlockedSlides', 'resetSliders', 'responsiveSlides'];
2810+
var extensions = ['fadingEffect', 'continuousHorizontal', 'scrollHorizontally', 'interlockedSlides', 'resetSliders', 'responsiveSlides', 'offsetSections', 'dragAndMove'];
28282811
if($('html').hasClass(ENABLED)){
28292812
showError('error', 'Fullpage.js can only be initialized once and you are doing it multiple times!');
28302813
return;
@@ -2841,13 +2824,13 @@
28412824
showError('warn', 'Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox');
28422825
}
28432826

2844-
if(options.continuousVertical && options.scrollBar){
2827+
if(options.continuousVertical && (options.scrollBar || !options.autoScrolling)){
28452828
options.continuousVertical = false;
2846-
showError('warn', 'Option `scrollBar` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled');
2829+
showError('warn', 'Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled');
28472830
}
28482831

28492832
//using extensions? Wrong file!
2850-
extensions.forEach(function(extension){
2833+
$.each(extensions, function(index, extension){
28512834
//is the option set to true?
28522835
if(options[extension]){
28532836
showError('warn', 'fullpage.js extensions require jquery.fullpage.extensions.min.js file instead of the usual jquery.fullpage.js. Requested: '+ extension);
@@ -2918,16 +2901,29 @@
29182901
refreshId: null,
29192902
iScrollInstances: [],
29202903

2904+
// Enables or disables the mouse wheel for the active section or all slides in it
2905+
toggleWheel: function(value){
2906+
var scrollable = $(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL);
2907+
scrollable.each(function(){
2908+
var iScrollInstance = $(this).data('iscrollInstance');
2909+
if(typeof iScrollInstance !== 'undefined' && iScrollInstance){
2910+
if(value){
2911+
iScrollInstance.wheelOn();
2912+
}
2913+
else{
2914+
iScrollInstance.wheelOff();
2915+
}
2916+
}
2917+
});
2918+
},
2919+
29212920
/**
29222921
* Turns off iScroll for the destination section.
29232922
* When scrolling very fast on some trackpads (and Apple laptops) the inertial scrolling would
29242923
* scroll the destination section/slide before the sections animations ends.
29252924
*/
29262925
onLeave: function(){
2927-
var scroller = $(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL).data('iscrollInstance');
2928-
if(typeof scroller !== 'undefined' && scroller){
2929-
scroller.wheelOff();
2930-
}
2926+
iscrollHandler.toggleWheel(false);
29312927
},
29322928

29332929
// Turns off iScroll for the leaving section
@@ -2937,10 +2933,7 @@
29372933

29382934
// Turns on iScroll on section load
29392935
afterLoad: function(){
2940-
var scroller = $(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL).data('iscrollInstance');
2941-
if(typeof scroller !== 'undefined' && scroller){
2942-
scroller.wheelOn();
2943-
}
2936+
iscrollHandler.toggleWheel(true);
29442937
},
29452938

29462939
/**
@@ -2954,7 +2947,7 @@
29542947

29552948
scrollable.height(scrollHeight);
29562949
scrollable.each(function() {
2957-
var $this = jQuery(this);
2950+
var $this = $(this);
29582951
var iScrollInstance = $this.data('iscrollInstance');
29592952
if (iScrollInstance) {
29602953
$.each(iscrollHandler.iScrollInstances, function(){

0 commit comments

Comments
 (0)