/** * customized version of iscroll.js 0.1.3 * it fixes bugs affecting its integration with fullpage.js * @license */ !function(r,n,p){var f=r.requestanimationframe||r.webkitrequestanimationframe||r.mozrequestanimationframe||r.orequestanimationframe||r.msrequestanimationframe||function(t){r.settimeout(t,1e3/60)},m=function(){var e={},o=n.createelement("div").style,i=function(){for(var t=["t","webkitt","mozt","mst","ot"],i=0,s=t.length;io+this.options.directionlockthreshold?this.directionlocked="h":o>=e+this.options.directionlockthreshold?this.directionlocked="v":this.directionlocked="n"),"h"==this.directionlocked){if("vertical"==this.options.eventpassthrough)t.preventdefault();else if("horizontal"==this.options.eventpassthrough)return void(this.initiated=!1);h=0}else if("v"==this.directionlocked){if("horizontal"==this.options.eventpassthrough)t.preventdefault();else if("vertical"==this.options.eventpassthrough)return void(this.initiated=!1);r=0}r=this.hashorizontalscroll?r:0,h=this.hasverticalscroll?h:0,i=this.x+r,s=this.y+h,(0-this.scrollerwidth;){for(this.pages[r]=[],o=t=0;o>-this.scrollerheight;)this.pages[r][t]={x:p.max(a,this.maxscrollx),y:p.max(o,this.maxscrolly),width:l,height:c,cx:a-s,cy:o-e},o-=c,t++;a-=l,r++}else for(t=(n=this.options.snap).length,i=-1;rthis.maxscrollx&&h++;this.gotopage(this.currentpage.pagex||0,this.currentpage.pagey||0,0),this.options.snapthreshold%1==0?(this.snapthresholdx=this.options.snapthreshold,this.snapthresholdy=this.options.snapthreshold):(this.snapthresholdx=p.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].width*this.options.snapthreshold),this.snapthresholdy=p.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].height*this.options.snapthreshold))}}),this.on("flick",function(){var t=this.options.snapspeed||p.max(p.max(p.min(p.abs(this.x-this.startx),1e3),p.min(p.abs(this.y-this.starty),1e3)),300);this.gotopage(this.currentpage.pagex+this.directionx,this.currentpage.pagey+this.directiony,t)})},_nearestsnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pagex:0,pagey:0};var s=0,e=this.pages.length,o=0;if(p.abs(t-this.absstartx)=this.pages[s][0].cx){t=this.pages[s][0].x;break}for(e=this.pages[s].length;o=this.pages[0][o].cy){i=this.pages[0][o].y;break}return s==this.currentpage.pagex&&((s+=this.directionx)<0?s=0:s>=this.pages.length&&(s=this.pages.length-1),t=this.pages[s][0].x),o==this.currentpage.pagey&&((o+=this.directiony)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pagex:s,pagey:o}},gotopage:function(t,i,s,e){e=e||this.options.bounceeasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var o=this.pages[t][i].x,n=this.pages[t][i].y;s=void 0===s?this.options.snapspeed||p.max(p.max(p.min(p.abs(o-this.x),1e3),p.min(p.abs(n-this.y),1e3)),300):s,this.currentpage={x:o,y:n,pagex:t,pagey:i},this.scrollto(o,n,s,e)},next:function(t,i){var s=this.currentpage.pagex,e=this.currentpage.pagey;++s>=this.pages.length&&this.hasverticalscroll&&(s=0,e++),this.gotopage(s,e,t,i)},prev:function(t,i){var s=this.currentpage.pagex,e=this.currentpage.pagey;--s<0&&this.hasverticalscroll&&(s=0,e--),this.gotopage(s,e,t,i)},_initkeys:function(t){var i,s={pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keybindings)for(i in this.options.keybindings)"string"==typeof this.options.keybindings[i]&&(this.options.keybindings[i]=this.options.keybindings[i].touppercase().charcodeat(0));else this.options.keybindings={};for(i in s)this.options.keybindings[i]=this.options.keybindings[i]||s[i];m.addevent(r,"keydown",this),this.on("destroy",function(){m.removeevent(r,"keydown",this)})},_key:function(t){if(this.enabled){var i,s=this.options.snap,e=s?this.currentpage.pagex:this.x,o=s?this.currentpage.pagey:this.y,n=m.gettime(),r=this.keytime||0;switch(this.options.usetransition&&this.isintransition&&(i=this.getcomputedposition(),this._translate(p.round(i.x),p.round(i.y)),this.isintransition=!1),this.keyacceleration=n-r<200?p.min(this.keyacceleration+.25,50):0,t.keycode){case this.options.keybindings.pageup:this.hashorizontalscroll&&!this.hasverticalscroll?e+=s?1:this.wrapperwidth:o+=s?1:this.wrapperheight;break;case this.options.keybindings.pagedown:this.hashorizontalscroll&&!this.hasverticalscroll?e-=s?1:this.wrapperwidth:o-=s?1:this.wrapperheight;break;case this.options.keybindings.end:e=s?this.pages.length-1:this.maxscrollx,o=s?this.pages[0].length-1:this.maxscrolly;break;case this.options.keybindings.home:o=e=0;break;case this.options.keybindings.left:e+=s?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.up:o+=s?1:5+this.keyacceleration>>0;break;case this.options.keybindings.right:e-=s?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.down:o-=s?1:5+this.keyacceleration>>0;break;default:return}s?this.gotopage(e,o):(0this.maxboundaryx?t="scale"==this.options.shrink?(this.width=p.max(this.indicatorwidth-(t-this.maxposx),8),this.indicatorstyle.width=this.width+"px",this.maxposx+this.indicatorwidth-this.width):this.maxboundaryx:"scale"==this.options.shrink&&this.width!=this.indicatorwidth&&(this.width=this.indicatorwidth,this.indicatorstyle.width=this.width+"px"),ithis.maxboundaryy?i="scale"==this.options.shrink?(this.height=p.max(this.indicatorheight-3*(i-this.maxposy),8),this.indicatorstyle.height=this.height+"px",this.maxposy+this.indicatorheight-this.height):this.maxboundaryy:"scale"==this.options.shrink&&this.height!=this.indicatorheight&&(this.height=this.indicatorheight,this.indicatorstyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.usetransform?this.indicatorstyle[m.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translatez:(this.indicatorstyle.left=t+"px",this.indicatorstyle.top=i+"px")},_pos:function(t,i){t<0?t=0:t>this.maxposx&&(t=this.maxposx),i<0?i=0:i>this.maxposy&&(i=this.maxposy),t=this.options.listenx?p.round(t/this.sizeratiox):this.scroller.x,i=this.options.listeny?p.round(i/this.sizeratioy):this.scroller.y,this.scroller.scrollto(t,i)},fade:function(t,i){if(!i||this.visible){cleartimeout(this.fadetimeout),this.fadetimeout=null;var s=t?250:500,e=t?0:300;t=t?"1":"0",this.wrapperstyle[m.style.transitionduration]=s+"ms",this.fadetimeout=settimeout(function(t){this.wrapperstyle.opacity=t,this.visible=+t}.bind(this,t),e)}}},t.utils=m,"undefined"!=typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd?(define(function(){return t}),void 0!==r&&(r.iscroll=t)):r.iscroll=t}(window,document,math), /*! * scrolloverflow 2.0.6 module for fullpage.js >= 3 * https://github.com/alvarotrigo/fullpage.js * @license mit licensed * * copyright (c) 2015 alvarotrigo.com - a project by alvaro trigo */ function(l,c){l.fp_scrolloverflow=function(){l.iscroll||(l.iscroll=module.exports);var s="fp-scrollable",n="."+s,t=".active",d=".fp-section",e=d+t,o=".fp-slide",u=".fp-tablecell";function r(){var p=this;function s(){fp_utils.hasclass(c.body,"fp-responsive")?i(e):i(t)}function t(t){if(!fp_utils.hasclass(t,"fp-noscroll")){fp_utils.css(t,{overflow:"hidden"});var i,s,e,o=p.options.scrolloverflowhandler,n=o.wrapcontent(),r=fp_utils.closest(t,d),h=o.scrollable(t),a=(s=r,null!=(e=fp_utils.closest(s,d))?parseint(getcomputedstyle(e)["padding-bottom"])+parseint(getcomputedstyle(e)["padding-top"]):0);null!=h?i=o.scrollheight(t):(i=t.scrollheight,p.options.verticalcentered&&(i=f(u,t)[0].scrollheight));var l=fp_utils.getwindowheight(),c=l-a;l=i.scrollheight}},scrollable:function(t){return f(".fp-slides",t).length?f(n,f(".fp-slide.active",t)[0])[0]:f(n,t)[0]},scrollheight:function(t){return f(".fp-scroller",f(n,t)[0])[0].scrollheight},remove:function(t){if(null!=t){var i=f(n,t)[0];if(null!=i){var s=i.fp_iscrollinstance;null!=s&&s.destroy(),i.fp_iscrollinstance=null,fp_utils.unwrap(f(".fp-scroller",t)[0]),fp_utils.unwrap(f(n,t)[0])}}},update:function(t,i){cleartimeout(a.refreshid),a.refreshid=settimeout(function(){a.iscrollinstances.foreach(function(t){t.refresh(),fullpage_api.silentmoveto(fp_utils.index(f(e)[0])+1)})},150),fp_utils.css(f(n,t)[0],{height:i+"px"}),h.verticalcentered&&fp_utils.css(f(n,t)[0].parentnode,{height:i+"px"})},wrapcontent:function(){var t=c.createelement("div");t.classname=s;var i=c.createelement("div");return i.classname="fp-scroller",{scrollable:t,scroller:i}}};return{iscrollhandler:a}}()}(window,document); //# sourcemappingurl=scrolloverflow.min.js.map