Skip to content

Commit

Permalink
- Updating version & dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarotrigo committed Jul 6, 2020
1 parent b486599 commit 2bb5e07
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 31 deletions.
9 changes: 5 additions & 4 deletions dist/fullpage.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* fullPage 3.0.8
* fullPage 3.0.9
* https://github.com/alvarotrigo/fullPage.js
*
* @license GPLv3 for open source use only
Expand Down Expand Up @@ -98,10 +98,11 @@ html.fp-enabled,
#fp-nav {
position: fixed;
z-index: 100;
margin-top: -32px;
top: 50%;
opacity: 1;
-webkit-transform: translate3d(0,0,0);
transform: translateY(-50%);
-ms-transform: translateY(-50%);
-webkit-transform: translate3d(0,-50%,0);
}
#fp-nav.fp-right {
right: 17px;
Expand Down Expand Up @@ -233,4 +234,4 @@ html.fp-enabled,
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
}
2 changes: 1 addition & 1 deletion dist/fullpage.extensions.min.js

Large diffs are not rendered by default.

47 changes: 36 additions & 11 deletions dist/fullpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
var g_initialAnchorsInDom = false;
var g_canFireMouseEnterNormalScroll = true;
var g_mediaLoadedId;
var g_transitionLapseId;
var extensions = [
'parallax',
'scrollOverflowReset',
Expand Down Expand Up @@ -852,7 +853,7 @@
if(!options.anchors.length){
var anchorsAttribute = '[data-anchor]';
var anchors = $(options.sectionSelector.split(',').join(anchorsAttribute + ',') + anchorsAttribute, container);
if(anchors.length){
if(anchors.length && anchors.length === $(SECTION_SEL).length){
g_initialAnchorsInDom = true;
anchors.forEach(function(item){
options.anchors.push(item.getAttribute('data-anchor').toString());
Expand Down Expand Up @@ -1095,10 +1096,7 @@
li += '</li>';
}
$('ul', nav)[0].innerHTML = li;

//centering it vertically
css($(SECTION_NAV_SEL), {'margin-top': '-' + ($(SECTION_NAV_SEL)[0].offsetHeight/2) + 'px'});


//activating the current active section

var bullet = $('li', $(SECTION_NAV_SEL)[0])[index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL)];
Expand All @@ -1108,9 +1106,10 @@
/**
* Gets the name for screen readers for a section/slide navigation bullet.
*/
function getBulletLinkName(i, defaultName){
function getBulletLinkName(i, defaultName, item){
var anchor = defaultName === 'Section' ? options.anchors[i] : item.getAttribute('data-anchor');
return options.navigationTooltips[i]
|| options.anchors[i]
|| anchor
|| defaultName + ' ' + (i+1);
}

Expand Down Expand Up @@ -1189,6 +1188,10 @@
function scrollHandler(){
var currentSection;

if(isResizing){
return;
}

if(!options.autoScrolling || options.scrollBar){
var currentScroll = getScrollTop();
var scrollDirection = getScrollDirection(currentScroll);
Expand Down Expand Up @@ -1865,6 +1868,9 @@
* Performs the vertical movement (by CSS3 or by jQuery)
*/
function performMovement(v){
var isFastSpeed = options.scrollingSpeed < 700;
var transitionLapse = isFastSpeed ? 700 : options.scrollingSpeed;

// using CSS3 translate functionality
if (options.css3 && options.autoScrolling && !options.scrollBar) {

Expand All @@ -1879,7 +1885,10 @@
clearTimeout(afterSectionLoadsId);
afterSectionLoadsId = setTimeout(function () {
afterSectionLoads(v);
}, options.scrollingSpeed);

//disabling canScroll when using fastSpeed
canScroll = !isFastSpeed;
}, options.scrollingSpeed);
}else{
afterSectionLoads(v);
}
Expand All @@ -1903,10 +1912,22 @@
afterSectionLoads(v);
},30);
}else{

afterSectionLoads(v);

//disabling canScroll when using fastSpeed
canScroll = !isFastSpeed;
}
});
}

// enabling canScroll after the minimum transition laps
if(isFastSpeed){
clearTimeout(g_transitionLapseId);
g_transitionLapseId = setTimeout(function(){
canScroll = true;
}, transitionLapse);
}
}

/**
Expand Down Expand Up @@ -2645,6 +2666,8 @@
* Resize event handler.
*/
function resizeHandler(){
isResizing = true;

clearTimeout(resizeId);

//in order to call the functions only when the resize is finished
Expand Down Expand Up @@ -2911,7 +2934,8 @@
addClass(nav, 'fp-' + options.slidesNavPosition);

for(var i=0; i< numSlides; i++){
appendTo(createElementFromHTML('<li><a href="#"><span class="fp-sr-only">'+ getBulletLinkName(i, 'Slide') +'</span><span></span></a></li>'), $('ul', nav)[0] );
var slide = $(SLIDE_SEL, section)[i];
appendTo(createElementFromHTML('<li><a href="#"><span class="fp-sr-only">'+ getBulletLinkName(i, 'Slide', slide) +'</span><span></span></a></li>'), $('ul', nav)[0] );
}

//centering it
Expand Down Expand Up @@ -3282,7 +3306,8 @@
scrollId,
scrollId2,
g_doubleCheckHeightId,
resizeHandlerId
resizeHandlerId,
g_transitionLapseId
].forEach(function(timeoutId){
clearTimeout(timeoutId);
});
Expand Down Expand Up @@ -3622,7 +3647,7 @@
}

/**
* Equivalent or jQuery function $().
* Equivalent of jQuery function $().
*/
function $(selector, context){
context = arguments.length > 1 ? context : document;
Expand Down
4 changes: 2 additions & 2 deletions 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 2bb5e07

Please sign in to comment.