fullpage-pagination
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -1,1 +0,1 @@ | ||
"use strict";function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var e=0;e<n.length;e++){var s=n[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,n,e){return n&&_defineProperties(t.prototype,n),e&&_defineProperties(t,e),t}function _defineProperty(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function ownKeys(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),e.push.apply(e,s)}return e}function _objectSpread2(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(e,!0).forEach(function(t){_defineProperty(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys(e).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}Object.defineProperty(exports,"__esModule",{value:!0});var isTouch="ontouchstart"in window||navigator.maxTouchPoints;function checkPropertiesSupport(){Element.prototype.closest||console.warn("This browser does not support `closest` method. You should use polyfill."),"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")||console.warn("This browser does not support `Promise`. You should use polyfill.")}function createTouchEvents(t){if(isTouch){var o=function(t,n){var e=document.createEvent("CustomEvent");return e.initCustomEvent(n,!0,!0,t.target),t.target.dispatchEvent(e),e=null,!1},a=!0,c={x:0,y:0},r={x:0,y:0},n={touchstart:function(t){c={x:t.touches[0].pageX,y:t.touches[0].pageY}},touchmove:function(t){a=!1,r={x:t.touches[0].pageX,y:t.touches[0].pageY}},touchend:function(t){if(a)o(t,"fc");else{var n=r.x-c.x,e=Math.abs(n),s=r.y-c.y,i=Math.abs(s);20<Math.max(e,i)&&o(t,i<e?n<0?"swl":"swr":s<0?"swu":"swd")}a=!0},touchcancel:function(t){a=!1}};for(var e in n)t.addEventListener(e,n[e],!1)}}function getIdFromUrl(){var t,n=window.location.href;if(-1!==n.indexOf("#")&&(t=n.substring(n.lastIndexOf("#"))),t)return t.slice(1)}var constants={IS_ACTIVE:"is-active",IS_ABSOLUTE:"is-absolute",IS_DISABLED:"is-disabled",navList:"fullpage-nav",navItem:"fullpage-nav__item",navButton:"fullpage-nav__button",prev:"fullpage__prev",next:"fullpage__next",anchor:"data-fullpage-anchor",anchorId:"data-fullpage-id",index:"data-fullpage-index"},Animator=function(){function n(t){_classCallCheck(this,n),this.paginator=t,this.sections=t.sections,this.from=t.current,this.to=t.next,this.current=this.sections[this.from],this.next=this.sections[this.to],this.container=t.container,this.translate=0,this.transition=t.options.transition,this.easing=t.options.easing,this.onExit=t.onExit,this.onEnter=t.onEnter,this.onComplete=t.onComplete,this.fadeIn=t.options.fadeIn,this.fadeInDuration=t.options.fadeInDuration,this.customTransition=t.options.customTransition}return _createClass(n,[{key:"animate",value:function(){this._onExit.call(this.paginator).then(this._changeSection.bind(this)).then(this._onEnter.bind(this.paginator)).then(this._onComplete.bind(this.paginator)).then(this.finish.bind(this.paginator))}},{key:"destroy",value:function(){this._removeStyles()}},{key:"fadeToggle",value:function(){var t=this;this.current.style.transition="opacity ".concat(this.fadeInDuration,"ms"),this.current.style.opacity=0,setTimeout(function(){t.current.style.display="none",t.current.style.transition="",t.current.classList.remove(constants.IS_ACTIVE)},this.fadeInDuration),this.next.classList.add(constants.IS_ACTIVE),this.next.style.display="",this.next.style.transition="opacity ".concat(this.fadeInDuration,"ms"),setTimeout(function(){t.next.style.opacity=1},66)}},{key:"scrollToSection",value:function(){var t=this,n=this.container.getBoundingClientRect().top,e=this.next.getBoundingClientRect().top-n;this.translate=e,this.container.style.transform="translate(0px, -".concat(this.translate,"px)"),this.container.style.transition="transform ".concat(this.transition,"ms ").concat(this.easing),setTimeout(function(){t.container.style.transition="",t.toggleActiveClasses()},this.transition)}},{key:"toggleActiveClasses",value:function(){this.current.classList.remove(constants.IS_ACTIVE),this.next.classList.add(constants.IS_ACTIVE)}},{key:"_onExit",value:function(){var n=this;return new Promise(function(t){n.onExit?n.onExit(n.current,t):t()})}},{key:"_onEnter",value:function(){var n=this;return new Promise(function(t){n.onEnter?n.onEnter(n.next,t):t()})}},{key:"_onComplete",value:function(){var n=this;return new Promise(function(t){n.finishTime=(new Date).getTime(),n.onComplete?n.onComplete(n.next,t):t()})}},{key:"_changeSection",value:function(){this.fadeIn?this.fadeToggle():this.customTransition?this.toggleActiveClasses():this.scrollToSection()}},{key:"_removeStyles",value:function(){this.sections.forEach(function(t){t.style.opacity="",t.style.display="",t.style.transition=""})}}]),n}(),defaultParameters={delay:1e3,transition:500,easing:"ease",navigation:!1,renderNavButton:!1,prevButton:!1,nextButton:!1,fadeIn:!1,fadeInDuration:500,touchevents:!1,customTransition:!1,loop:!1,toggleClassesFirst:!1};function addTouchEvents(){createTouchEvents(document)}checkPropertiesSupport();var Fullpage=function(){function e(t,n){_classCallCheck(this,e),this.container=t,this.sections=[].slice.call(this.container.children),this.options=_objectSpread2({},defaultParameters,{},n),this.events=this.options.touchevents&&isTouch?["wheel","click","swu","swd"]:["wheel","click"],this.allowPagination=!0,this.current=0,this.next=null}return _createClass(e,[{key:"init",value:function(){this._addElementsAttributes(),this._crateNavigation(),this.paginateBinded=this.paginate.bind(this),this._paginate(),getIdFromUrl()&&1<getIdFromUrl().length&&this._paginateOnLoad(),this.afterLoad&&this.afterLoad()}},{key:"destroy",value:function(){this._removeListeners(),this._removeElementsAttributes(),this._removeNavigation(),this.animator&&this.animator.destroy()}},{key:"paginateToNext",value:function(t){this.direction=t?1:-1,this.next=this.current+this.direction}},{key:"paginateOnNavButtonClick",value:function(t,n){t.preventDefault();var e=+n.getAttribute(constants.index);"number"==typeof e&&(this.next=e,this.direction=this.next>this.current?1:-1)}},{key:"paginateOnAnchorClick",value:function(t,n){var e,s=n.getAttribute(constants.anchor);this.sections.forEach(function(t){(t.getAttribute(constants.anchorId)||null)===s&&(e=t)}),this.next=+e.getAttribute(constants.index),this.direction=this.next>this.current?1:-1}},{key:"paginateOnPrevNextClick",value:function(t,n,e){t.preventDefault(),this.paginateToNext(e)}},{key:"toggleDisableButtonsClasses",value:function(){this.next===this.sections.length-1?this.options.nextButton.classList.add(constants.IS_DISABLED):this.options.nextButton.classList.remove(constants.IS_DISABLED),0===this.next?this.options.prevButton.classList.add(constants.IS_DISABLED):this.options.prevButton.classList.remove(constants.IS_DISABLED)}},{key:"paginate",value:function(t){var e=this;if(this.allowPagination){if("wheel"===t.type&&this.paginateToNext(0<t.deltaY),"click"===t.type){var n=t.target.closest(".".concat(constants.navButton)),s=t.target.closest("[".concat(constants.anchor,"]")),i=t.target.closest(".".concat(constants.prev)),o=t.target.closest(".".concat(constants.next));if(!(n||s||i||o))return;n&&this.paginateOnNavButtonClick(t,n),s&&this.paginateOnAnchorClick(t,s),(i||o)&&this.paginateOnPrevNextClick(t,i,o)}if(this.options.touchevents&&("swu"===t.type&&this.paginateToNext(!0),"swd"===t.type&&this.paginateToNext(!1)),!t.type){var a=t;this.sections.forEach(function(t,n){t.hasAttribute(constants.anchorId,a)&&(e.next=n)})}if(this.options.loop){if(this.next>this.sections.length-1?this.next=0:this.next<0&&(this.next=this.sections.length-1),this.next===this.current)return}else if(this.next>=this.sections.length||this.next<0||this.next===this.current)return;this.options.loop||this.toggleDisableButtonsClasses(),this.next>=this.sections.length||this.next<0||this.next===this.current||(this.allowPagination=!1,this.navigation.forEach(function(t){t.classList.remove(constants.IS_ACTIVE)}),this.navigation[this.next].classList.add(constants.IS_ACTIVE),this.options.toggleClassesFirst&&(this.sections[this.current].classList.remove(constants.IS_ACTIVE),this.sections[this.next].classList.add(constants.IS_ACTIVE)),this.startTime=(new Date).getTime(),this.animator=new Animator(this),this.animator.finish=function(){e.current=e.next,e.finishTime-e.startTime<e.options.delay?setTimeout(function(){e.allowPagination=!0},e.options.delay):e.allowPagination=!0},this.animator.animate())}}},{key:"_addElementsAttributes",value:function(){this.options.fadeIn&&(this.sections.forEach(function(t){t.classList.add(constants.IS_ABSOLUTE),t.style.opacity=0}),this.sections[0].style.opacity=1),this.sections[0].classList.add(constants.IS_ACTIVE),this.sections.forEach(function(t,n){t.setAttribute(constants.index,n)}),this.options.prevButton&&this.options.prevButton.classList.add(constants.prev),this.options.nextButton&&this.options.nextButton.classList.add(constants.next),this.options.loop||0===this.current&&this.options.prevButton.classList.add(constants.IS_DISABLED)}},{key:"_paginate",value:function(){var n=this;this.events.forEach(function(t){document.addEventListener(t,n.paginateBinded)})}},{key:"_paginateOnLoad",value:function(){this.paginate(getIdFromUrl())}},{key:"_crateNavigation",value:function(){if(this.options.navigation){var t=this.options.navigation;t.innerHTML='<ul class="'.concat(constants.navList,'"></ul>');for(var n=0;n<this.sections.length;n++){var e=t.querySelector("ul"),s=document.createElement("li");s.className=constants.navItem,this.options.renderNavButton?s.innerHTML=0===n?'<button class="'.concat(constants.navButton," ").concat(constants.IS_ACTIVE,'" ').concat(constants.index,'="').concat(n,'">').concat(this.options.renderNavButton(n),"</button>"):'<button class="'.concat(constants.navButton,'" ').concat(constants.index,'="').concat(n,'">').concat(this.options.renderNavButton(n),"</button>"):s.innerHTML=0===n?'<button class="'.concat(constants.navButton," ").concat(constants.IS_ACTIVE,'" ').concat(constants.index,'="').concat(n,'">').concat(n+1,"</button>"):'<button class="'.concat(constants.navButton,'" ').concat(constants.index,'="').concat(n,'">').concat(n+1,"</button>"),e.appendChild(s)}this.navigation=[].slice.call(t.querySelectorAll(".".concat(constants.navButton)))}}},{key:"_removeListeners",value:function(){var n=this;this.events.forEach(function(t){document.removeEventListener(t,n.paginateBinded)})}},{key:"_removeElementsAttributes",value:function(){this.sections.forEach(function(t){t.classList.remove(constants.IS_ACTIVE),t.classList.remove(constants.IS_ABSOLUTE),t.style.opacity="",t.removeAttribute(constants.index)})}},{key:"_removeNavigation",value:function(){this.options.navigation&&(this.options.navigation.innerHTML="")}}]),e}();exports.Fullpage=Fullpage,exports.addTouchEvents=addTouchEvents; | ||
"use strict";function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var e=0;e<n.length;e++){var s=n[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,n,e){return n&&_defineProperties(t.prototype,n),e&&_defineProperties(t,e),t}function _defineProperty(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function ownKeys(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),e.push.apply(e,s)}return e}function _objectSpread2(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(e,!0).forEach(function(t){_defineProperty(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys(e).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}Object.defineProperty(exports,"__esModule",{value:!0});var isTouch="ontouchstart"in window||navigator.maxTouchPoints;function checkPropertiesSupport(){Element.prototype.closest||console.warn("This browser does not support `closest` method. You should use polyfill."),"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")||console.warn("This browser does not support `Promise`. You should use polyfill.")}function createTouchEvents(t){if(isTouch){var o=function(t,n){var e=document.createEvent("CustomEvent");return e.initCustomEvent(n,!0,!0,t.target),t.target.dispatchEvent(e),e=null,!1},a=!0,c={x:0,y:0},r={x:0,y:0},n={touchstart:function(t){c={x:t.touches[0].pageX,y:t.touches[0].pageY}},touchmove:function(t){a=!1,r={x:t.touches[0].pageX,y:t.touches[0].pageY}},touchend:function(t){if(a)o(t,"fc");else{var n=r.x-c.x,e=Math.abs(n),s=r.y-c.y,i=Math.abs(s);20<Math.max(e,i)&&o(t,i<e?n<0?"swl":"swr":s<0?"swu":"swd")}a=!0},touchcancel:function(t){a=!1}};for(var e in n)t.addEventListener(e,n[e],!1)}}function getIdFromUrl(){var t,n=window.location.href;if(-1!==n.indexOf("#")&&(t=n.substring(n.lastIndexOf("#"))),t)return t.slice(1)}var constants={IS_ACTIVE:"is-active",IS_ABSOLUTE:"is-absolute",IS_DISABLED:"is-disabled",navList:"fullpage-nav",navItem:"fullpage-nav__item",navButton:"fullpage-nav__button",prev:"fullpage__prev",next:"fullpage__next",anchor:"data-fullpage-anchor",anchorId:"data-fullpage-id",index:"data-fullpage-index"},Animator=function(){function n(t){_classCallCheck(this,n),this.paginator=t,this.sections=t.sections,this.from=t.current,this.to=t.next,this.current=this.sections[this.from],this.next=this.sections[this.to],this.container=t.container,this.translate=0,this.transition=t.options.transition,this.easing=t.options.easing,this.onExit=t.onExit,this.onEnter=t.onEnter,this.onComplete=t.onComplete,this.fadeIn=t.options.fadeIn,this.fadeInDuration=t.options.fadeInDuration,this.customTransition=t.options.customTransition}return _createClass(n,[{key:"animate",value:function(){this._onExit.call(this.paginator).then(this._changeSection.bind(this)).then(this._onEnter.bind(this.paginator)).then(this._onComplete.bind(this.paginator)).then(this.finish.bind(this.paginator))}},{key:"destroy",value:function(){this._removeStyles()}},{key:"fadeToggle",value:function(){var t=this;this.current.style.transition="opacity ".concat(this.fadeInDuration,"ms"),this.current.style.opacity=0,setTimeout(function(){t.current.style.display="none",t.current.style.transition="",t.current.classList.remove(constants.IS_ACTIVE)},this.fadeInDuration),this.next.classList.add(constants.IS_ACTIVE),this.next.style.display="",this.next.style.transition="opacity ".concat(this.fadeInDuration,"ms"),setTimeout(function(){t.next.style.opacity=1},66)}},{key:"scrollToSection",value:function(){var t=this,n=this.container.getBoundingClientRect().top,e=this.next.getBoundingClientRect().top-n;this.translate=e,this.container.style.transform="translate(0px, -".concat(this.translate,"px)"),this.container.style.transition="transform ".concat(this.transition,"ms ").concat(this.easing),setTimeout(function(){t.container.style.transition="",t.toggleActiveClasses()},this.transition)}},{key:"toggleActiveClasses",value:function(){this.current.classList.remove(constants.IS_ACTIVE),this.next.classList.add(constants.IS_ACTIVE)}},{key:"_onExit",value:function(){var n=this;return new Promise(function(t){n.onExit?n.onExit(n.animator.current,t):t()})}},{key:"_onEnter",value:function(){var n=this;return new Promise(function(t){n.onEnter?n.onEnter(n.animator.next,t):t()})}},{key:"_onComplete",value:function(){var n=this;return new Promise(function(t){n.finishTime=(new Date).getTime(),n.onComplete?n.onComplete(n.animator.next,t):t()})}},{key:"_changeSection",value:function(){this.fadeIn?this.fadeToggle():this.customTransition?this.toggleActiveClasses():this.scrollToSection()}},{key:"_removeStyles",value:function(){this.sections.forEach(function(t){t.style.opacity="",t.style.display="",t.style.transition=""})}}]),n}(),defaultParameters={delay:1e3,transition:500,easing:"ease",navigation:!1,renderNavButton:!1,prevButton:!1,nextButton:!1,fadeIn:!1,fadeInDuration:500,touchevents:!1,customTransition:!1,loop:!1,toggleClassesFirst:!1};function addTouchEvents(){createTouchEvents(document)}checkPropertiesSupport();var Fullpage=function(){function e(t,n){_classCallCheck(this,e),this.container=t,this.sections=[].slice.call(this.container.children),this.options=_objectSpread2({},defaultParameters,{},n),this.events=this.options.touchevents&&isTouch?["wheel","click","swu","swd"]:["wheel","click"],this.allowPagination=!0,this.current=0,this.next=null}return _createClass(e,[{key:"init",value:function(){this._addElementsAttributes(),this._crateNavigation(),this.paginateBinded=this.paginate.bind(this),this._paginate(),getIdFromUrl()&&1<getIdFromUrl().length&&this._paginateOnLoad(),this.afterLoad&&this.afterLoad()}},{key:"destroy",value:function(){this._removeListeners(),this._removeElementsAttributes(),this._removeNavigation(),this.animator&&this.animator.destroy()}},{key:"paginateToNext",value:function(t){this.direction=t?1:-1,this.next=this.current+this.direction}},{key:"paginateOnNavButtonClick",value:function(t,n){t.preventDefault();var e=+n.getAttribute(constants.index);"number"==typeof e&&(this.next=e,this.direction=this.next>this.current?1:-1)}},{key:"paginateOnAnchorClick",value:function(t,n){var e,s=n.getAttribute(constants.anchor);this.sections.forEach(function(t){(t.getAttribute(constants.anchorId)||null)===s&&(e=t)}),this.next=+e.getAttribute(constants.index),this.direction=this.next>this.current?1:-1}},{key:"paginateOnPrevNextClick",value:function(t,n,e){t.preventDefault(),this.paginateToNext(e)}},{key:"toggleDisableButtonsClasses",value:function(){this.next===this.sections.length-1?this.options.nextButton.classList.add(constants.IS_DISABLED):this.options.nextButton.classList.remove(constants.IS_DISABLED),0===this.next?this.options.prevButton.classList.add(constants.IS_DISABLED):this.options.prevButton.classList.remove(constants.IS_DISABLED)}},{key:"paginate",value:function(t){var e=this;if(this.allowPagination){if("wheel"===t.type&&this.paginateToNext(0<t.deltaY),"click"===t.type){var n=t.target.closest(".".concat(constants.navButton)),s=t.target.closest("[".concat(constants.anchor,"]")),i=t.target.closest(".".concat(constants.prev)),o=t.target.closest(".".concat(constants.next));if(!(n||s||i||o))return;n&&this.paginateOnNavButtonClick(t,n),s&&this.paginateOnAnchorClick(t,s),(i||o)&&this.paginateOnPrevNextClick(t,i,o)}if(this.options.touchevents&&("swu"===t.type&&this.paginateToNext(!0),"swd"===t.type&&this.paginateToNext(!1)),!t.type){var a=t;this.sections.forEach(function(t,n){t.hasAttribute(constants.anchorId,a)&&(e.next=n)})}if(this.options.loop){if(this.next>this.sections.length-1?this.next=0:this.next<0&&(this.next=this.sections.length-1),this.next===this.current)return}else if(this.next>=this.sections.length||this.next<0||this.next===this.current)return;this.options.loop||this.toggleDisableButtonsClasses(),this.next>=this.sections.length||this.next<0||this.next===this.current||(this.allowPagination=!1,this.navigation.forEach(function(t){t.classList.remove(constants.IS_ACTIVE)}),this.navigation[this.next].classList.add(constants.IS_ACTIVE),this.options.toggleClassesFirst&&(this.sections[this.current].classList.remove(constants.IS_ACTIVE),this.sections[this.next].classList.add(constants.IS_ACTIVE)),this.startTime=(new Date).getTime(),this.animator=new Animator(this),this.animator.finish=function(){e.current=e.next,e.finishTime-e.startTime<e.options.delay?setTimeout(function(){e.allowPagination=!0},e.options.delay):e.allowPagination=!0},this.animator.animate())}}},{key:"_addElementsAttributes",value:function(){this.options.fadeIn&&(this.sections.forEach(function(t){t.classList.add(constants.IS_ABSOLUTE),t.style.opacity=0}),this.sections[0].style.opacity=1),this.sections[0].classList.add(constants.IS_ACTIVE),this.sections.forEach(function(t,n){t.setAttribute(constants.index,n)}),this.options.prevButton&&this.options.prevButton.classList.add(constants.prev),this.options.nextButton&&this.options.nextButton.classList.add(constants.next),this.options.loop||0===this.current&&this.options.prevButton.classList.add(constants.IS_DISABLED)}},{key:"_paginate",value:function(){var n=this;this.events.forEach(function(t){document.addEventListener(t,n.paginateBinded)})}},{key:"_paginateOnLoad",value:function(){this.paginate(getIdFromUrl())}},{key:"_crateNavigation",value:function(){if(this.options.navigation){var t=this.options.navigation;t.innerHTML='<ul class="'.concat(constants.navList,'"></ul>');for(var n=0;n<this.sections.length;n++){var e=t.querySelector("ul"),s=document.createElement("li");s.className=constants.navItem,this.options.renderNavButton?s.innerHTML=0===n?'<button class="'.concat(constants.navButton," ").concat(constants.IS_ACTIVE,'" ').concat(constants.index,'="').concat(n,'">').concat(this.options.renderNavButton(n),"</button>"):'<button class="'.concat(constants.navButton,'" ').concat(constants.index,'="').concat(n,'">').concat(this.options.renderNavButton(n),"</button>"):s.innerHTML=0===n?'<button class="'.concat(constants.navButton," ").concat(constants.IS_ACTIVE,'" ').concat(constants.index,'="').concat(n,'">').concat(n+1,"</button>"):'<button class="'.concat(constants.navButton,'" ').concat(constants.index,'="').concat(n,'">').concat(n+1,"</button>"),e.appendChild(s)}this.navigation=[].slice.call(t.querySelectorAll(".".concat(constants.navButton)))}}},{key:"_removeListeners",value:function(){var n=this;this.events.forEach(function(t){document.removeEventListener(t,n.paginateBinded)})}},{key:"_removeElementsAttributes",value:function(){this.sections.forEach(function(t){t.classList.remove(constants.IS_ACTIVE),t.classList.remove(constants.IS_ABSOLUTE),t.style.opacity="",t.removeAttribute(constants.index)})}},{key:"_removeNavigation",value:function(){this.options.navigation&&(this.options.navigation.innerHTML="")}}]),e}();exports.Fullpage=Fullpage,exports.addTouchEvents=addTouchEvents; |
{ | ||
"name": "fullpage-pagination", | ||
"description": "JS plugin for making fullpage pagination", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "start": "rollup -c -w", |
@@ -76,3 +76,3 @@ import constants from './components/constants'; | ||
if (this.onExit) { | ||
this.onExit(this.current, resolve); | ||
this.onExit(this.animator.current, resolve); | ||
} else { | ||
@@ -87,3 +87,3 @@ resolve(); | ||
if (this.onEnter) { | ||
this.onEnter(this.next, resolve); | ||
this.onEnter(this.animator.next, resolve); | ||
} else { | ||
@@ -100,3 +100,3 @@ resolve(); | ||
if (this.onComplete) { | ||
this.onComplete(this.next, resolve); | ||
this.onComplete(this.animator.next, resolve); | ||
} else { | ||
@@ -103,0 +103,0 @@ resolve(); |
@@ -329,3 +329,3 @@ 'use strict'; | ||
if (_this3.onExit) { | ||
_this3.onExit(_this3.current, resolve); | ||
_this3.onExit(_this3.animator.current, resolve); | ||
} else { | ||
@@ -343,3 +343,3 @@ resolve(); | ||
if (_this4.onEnter) { | ||
_this4.onEnter(_this4.next, resolve); | ||
_this4.onEnter(_this4.animator.next, resolve); | ||
} else { | ||
@@ -359,3 +359,3 @@ resolve(); | ||
if (_this5.onComplete) { | ||
_this5.onComplete(_this5.next, resolve); | ||
_this5.onComplete(_this5.animator.next, resolve); | ||
} else { | ||
@@ -362,0 +362,0 @@ resolve(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56807