Skip to content

Commit

Permalink
Merge pull request alvarotrigo#3333 from alvarotrigo/dev
Browse files Browse the repository at this point in the history
Merging dev branch
  • Loading branch information
alvarotrigo committed Jul 26, 2018
2 parents aefbf8f + 1c8d4cf commit 4ba9a4a
Show file tree
Hide file tree
Showing 61 changed files with 490 additions and 136 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
.ignore/
bower_components/
node_modules/
**/node_modules/
package-lock.json
src/fullpage.extensions.js
src/fullpage.extensions.js
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

---

![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.1-brightgreen.svg)
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.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 @@ -64,7 +64,7 @@ Special thanks to [Browserstack](http://www.browserstack.com/) for supporting fu
## License

### Commercial license
If you want to use fullPage to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Which means, you won't have to change your whole application source code to an open source license. [[Purchase a Fullpage Commercial License]](https://alvarotrigo.com/fullPage/pricing/)
If you want to use fullPage to develop non open sourced sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Which means, you won't have to change your whole application source code to an open source license. [[Purchase a Fullpage Commercial License]](https://alvarotrigo.com/fullPage/pricing/)

### Open source license
If you are creating an open source application under a license compatible with the [GNU GPL license v3](https://www.gnu.org/licenses/gpl-3.0.html), you may use fullPage under the terms of the GPLv3.
Expand Down Expand Up @@ -247,7 +247,7 @@ var myFullpage = new fullpage('#fullpage', {
onLeave: function(origin, destination, direction){},
afterLoad: function(origin, destination, direction){},
afterRender: function(){},
afterResize: function(){width, height},
afterResize: function(width, height){},
afterResponsive: function(isResponsive){},
afterSlideLoad: function(section, origin, destination, direction){},
onSlideLeave: function(section, origin, destination, direction){}
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 3.0.0
* fullPage 3.0.2
* 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.

46 changes: 25 additions & 21 deletions dist/fullpage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* fullPage 3.0.0
* fullPage 3.0.2
* https://github.com/alvarotrigo/fullPage.js
*
* @license GPLv3 for open source use only
Expand Down Expand Up @@ -191,7 +191,7 @@

var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);
var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));
var container = $(containerSelector)[0];
var container = typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector;
var windowsHeight = getWindowHeight();
var isResizing = false;
var isWindowFocused = true;
Expand Down Expand Up @@ -525,9 +525,9 @@
}
}

if($(containerSelector).length){
if(container){
//public functions
FP.version = '3.0.0';
FP.version = '3.0.2';
FP.setAutoScrolling = setAutoScrolling;
FP.setRecordHistory = setRecordHistory;
FP.setScrollingSpeed = setScrollingSpeed;
Expand Down Expand Up @@ -634,8 +634,8 @@
document.addEventListener(eventName, function(e){
var target = e.target;

if(target && matches(target, SECTION_NAV_SEL + ' a')){
sectionBulletHandler.call(target);
if(target && closest(target, SECTION_NAV_SEL + ' a')){
sectionBulletHandler.call(target, e);
}
else if(matches(target, SECTION_NAV_TOOLTIP_SEL)){
tooltipTextHandler.call(target);
Expand Down Expand Up @@ -689,7 +689,8 @@

//no anchors option? Checking for them in the DOM attributes
if(!options.anchors.length){
var anchors = $(SECTION_SEL+'[data-anchor]');
var attrName = '[data-anchor]';
var anchors = $(options.sectionSelector.split(',').join(attrName + ',') + attrName, container);
if(anchors.length){
anchors.forEach(function(item){
options.anchors.push(item.getAttribute('data-anchor').toString());
Expand All @@ -699,7 +700,8 @@

//no tooltips option? Checking for them in the DOM attributes
if(!options.navigationTooltips.length){
var tooltips = $('[data-tooltip]', container);
var attrName = '[data-tooltip]';
var tooltips = $(options.sectionSelector.split(',').join(attrName + ',') + attrName, container);
if(tooltips.length){
tooltips.forEach(function(item){
options.navigationTooltips.push(item.getAttribute('data-tooltip').toString());
Expand Down Expand Up @@ -732,16 +734,16 @@

//styling the sections / slides / menu
for(var i = 0; i<sections.length; i++){
var index = i;
var sectionIndex = i;
var section = sections[i];
var slides = $(SLIDE_SEL, section);
var numSlides = slides.length;

//caching the original styles to add them back on destroy('all')
section.setAttribute('data-fp-styles', section.getAttribute('style'));

styleSection(section, index);
styleMenu(section, index);
styleSection(section, sectionIndex);
styleMenu(section, sectionIndex);

// if there's any slide
if (numSlides > 0) {
Expand Down Expand Up @@ -925,7 +927,7 @@
var tooltip = options.navigationTooltips[i];

if (typeof tooltip !== 'undefined' && tooltip !== '') {
li += '<div class="' + SECTION_NAV_TOOLTIP + ' ' + options.navigationPosition + '">' + tooltip + '</div>';
li += '<div class="' + SECTION_NAV_TOOLTIP + ' fp-' + options.navigationPosition + '">' + tooltip + '</div>';
}

li += '</li>';
Expand Down Expand Up @@ -1844,9 +1846,11 @@
});

if(matches(element, 'source')){
var typeToPlay = closest(element, 'video') != null ? 'video' : 'audio';
closest(element, typeToPlay).load();
var elementToPlay = closest(element, 'video, audio');
if(elementToPlay){
elementToPlay.load();
}
}
});
}

Expand Down Expand Up @@ -2069,7 +2073,7 @@
}

//is there an element with focus?
if(activeElement.length){
if(activeElement){
if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SLIDE_ACTIVE_SEL) == null){
activeElement = preventAndFocusFirst(e);
}
Expand Down Expand Up @@ -2117,15 +2121,15 @@
preventDefault(e);

/*jshint validthis:true */
var index = index(this.parentNode);
scrollPage($(SECTION_SEL)[index]);
var indexBullet = index(closest(this, SECTION_NAV_SEL + ' li'));
scrollPage($(SECTION_SEL)[indexBullet]);
}

//Scrolls the slider to the given slide destination for the given section
function slideBulletHandler(e){
preventDefault(e);

/*jshint validthis: true */
/*jshint validthis:true */
var slides = $(SLIDES_WRAPPER_SEL, closest(this, SECTION_SEL))[0];
var destiny = $(SLIDE_SEL, slides)[index(closest(this, 'li'))];

Expand Down Expand Up @@ -3144,7 +3148,7 @@
extensions.forEach(function(extension){
//is the option set to true?
if(options[extension]){
showError('warn', 'fullpage.js extensions require jquery.fullpage.extensions.min.js file instead of the usual jquery.fullpage.js. Requested: '+ extension);
showError('warn', 'fullpage.js extensions require fullpage.extensions.min.js file instead of the usual fullpage.js. Requested: '+ extension);
}
});

Expand Down Expand Up @@ -3843,7 +3847,7 @@
/**
* jQuery adapter for fullPage.js 3.0.0
*/
if(window.jQuery){
if(window.jQuery && window.fullpage){
(function ($, fullpage) {
'use strict';

Expand All @@ -3862,4 +3866,4 @@ if(window.jQuery){
});
};
})(jQuery, fullpage);
}
}
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.

Loading

0 comments on commit 4ba9a4a

Please sign in to comment.