From b41cf41ac909ffad72aea8b828a801b07831df50 Mon Sep 17 00:00:00 2001 From: Luis Date: Wed, 12 Apr 2017 21:25:20 +0200 Subject: [PATCH] Zoom responsive --- .eslintrc | 2 +- src/js/plugins/zoom.js | 27 ++++++++++-------- static/css/base.css | 58 +++++++++++++++++++++++++------------- static/js/webslides.js | 29 +++++++++++-------- static/js/webslides.min.js | 4 +-- 5 files changed, 74 insertions(+), 46 deletions(-) diff --git a/.eslintrc b/.eslintrc index f9df343..39c58f0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,7 +8,7 @@ }, "rules": { "no-cond-assign": 0, - "no-console": 0, + "no-console": 2, "no-constant-condition": 2, "no-control-regex": 2, "no-debugger": 2, diff --git a/src/js/plugins/zoom.js b/src/js/plugins/zoom.js index f7c0cbc..4b245ed 100644 --- a/src/js/plugins/zoom.js +++ b/src/js/plugins/zoom.js @@ -95,19 +95,15 @@ export default class Zoom { divLayer.addEventListener('click', e => { this.zoomOut(); this.ws_.goToSlide(elem.i); - e.stopPropagation(); }); wrap.appendChild(divLayer); // Slide number const slideNumber = document.createElement('span'); slideNumber.className = 'slide-number'; - slideNumber.textContent = `${elem.i+1} / ${this.zws_.slides.length}`; + slideNumber.textContent = `${elem.i+1}`; div.appendChild(slideNumber); // Zoom out when click in slide "border" - div.addEventListener('click', e => { - this.ws_.toggleZoom(); - e.stopPropagation(); - }); + div.addEventListener('click', this.ws_.toggleZoom); this.setSizes_(div, wrap, elem); } @@ -130,11 +126,20 @@ export default class Zoom { const scale = divCSS.width.includes('%') ? 100 / DOM.parseSize(divCSS.width) : window.innerWidth / DOM.parseSize(divCSS.width); - elem.el.style.width = `${window.innerWidth - marginW * scale}px`; - elem.el.style.height = `${window.innerHeight - marginH * scale}px`; - - // Because of flexbox, wrap height is required - wrap.style.height = `${window.innerHeight / scale}px`; + if (scale == 1) { + // If the scale is 100% means it is mobile + const wsW = this.ws_.el.clientWidth; + elem.el.style.width = `${(wsW - marginW) * 2}px`; + elem.el.style.height = `${(wsW - marginH) * 1.5}px`; + elem.el.style.minHeight = scale == 1? 'auto' : ''; + // Because of flexbox, wrap height is required + wrap.style.height = `${window.innerWidth / 1.5}px`; + } else { + elem.el.style.width = `${window.innerWidth - marginW * scale}px`; + elem.el.style.height = `${window.innerHeight - marginH * scale}px`; + // Because of flexbox, wrap height is required + wrap.style.height = `${window.innerHeight / scale}px`; + } } /** diff --git a/static/css/base.css b/static/css/base.css index 75ef39c..e88b691 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -705,7 +705,7 @@ footer, height: 100%; margin: 0; } -/* -- Responsive background video +/* -- Responsive background video https://fvsch.com/code/video-background/ -- */ .fullscreen > .embed { @@ -723,18 +723,18 @@ https://fvsch.com/code/video-background/ -- */ .fullscreen > .embed > iframe, .fullscreen > .embed > object, .fullscreen > .embed > embed, - .fullscreen > .embed > video { - height: 300%; - top: -100%; + .fullscreen > .embed > video { + height: 300%; + top: -100%; } } @media (max-aspect-ratio: 16/9) { .fullscreen > .embed > iframe, .fullscreen > .embed > object, .fullscreen > .embed > embed, - .fullscreen > .embed > video { - width: 300%; - left: -100%; + .fullscreen > .embed > video { + width: 300%; + left: -100%; } } /* 2. If supporting object-fit, overriding (1): */ @@ -743,9 +743,9 @@ https://fvsch.com/code/video-background/ -- */ .fullscreen > .embed > object, .fullscreen > .embed > embed, .fullscreen > .embed > video { - top: 0; + top: 0; left: 0; - width: 100%; + width: 100%; height: 100%; object-fit: cover; } @@ -3227,14 +3227,14 @@ button:disabled:hover { } /*========================================= -15. Longform +15. Longform =========================================== */ /* -- Posts = .wrap.longform -- */ .longform { -width: 72rem; -/* Why 72rem=720px? +width: 72rem; +/* Why 72rem=720px? 90-95 characters per line = better reading speed */ } .longform .alignleft, .longform .alignright { @@ -3351,12 +3351,12 @@ Solution: stackoverflow.com/questions/34250282/flexbox-safari-bug-flex-wrap } #webslides-zoomed.grid > .column { width: 25%; - -webkit-order: 0; - order: 0; - -webkit-flex: 0 1 auto; - flex: 0 1 auto; - -webkit-align-self: auto; - align-self: auto; + -webkit-order: 0; + order: 0; + -webkit-flex: 0 1 auto; + flex: 0 1 auto; + -webkit-align-self: auto; + align-self: auto; } #webslides-zoomed.grid > .column > .wrap-zoom > .slide { @@ -3376,7 +3376,7 @@ Solution: stackoverflow.com/questions/34250282/flexbox-safari-bug-flex-wrap cursor: pointer; } #webslides-zoomed.grid > .column > .wrap-zoom:hover { -transform: scale(1.02); + transform: scale(1.02); } .text-slide-number { @@ -3385,4 +3385,22 @@ transform: scale(1.02); /*border-radius: .3rem; padding: 0 1.6rem;*/ margin: .8rem auto; - } \ No newline at end of file + } + +@media all and (orientation: portrait) { + #webslides-zoomed.grid > .column { + width: 50%; + } + #webslides-zoomed.grid > .column > .wrap-zoom > .slide { + transform: scale(0.5) translate(-50%, -50vh); + } +} + +@media (max-aspect-ratio: 2/3) { + #webslides-zoomed.grid > .column { + width: 100%; + } + #webslides-zoomed.grid > .column > .wrap-zoom > .slide { + transform: scale(0.5) translate(-50%, -30vh); + } +} diff --git a/static/js/webslides.js b/static/js/webslides.js index bc5fbf7..7d8d355 100644 --- a/static/js/webslides.js +++ b/static/js/webslides.js @@ -1,7 +1,7 @@ /*! * Name: WebSlides * Version: 1.2.1 - * Date: 2017-04-09 + * Date: 2017-04-12 * Description: Making HTML presentations easy * URL: https://github.com/webslides/webslides#readme * Credits: @jlantunez, @LuisSacristan, @Belelros @@ -2571,19 +2571,15 @@ var Zoom = function () { divLayer.addEventListener('click', function (e) { _this2.zoomOut(); _this2.ws_.goToSlide(elem.i); - e.stopPropagation(); }); wrap.appendChild(divLayer); // Slide number var slideNumber = document.createElement('span'); slideNumber.className = 'slide-number'; - slideNumber.textContent = elem.i + 1 + ' / ' + this.zws_.slides.length; + slideNumber.textContent = '' + (elem.i + 1); div.appendChild(slideNumber); // Zoom out when click in slide "border" - div.addEventListener('click', function (e) { - _this2.ws_.toggleZoom(); - e.stopPropagation(); - }); + div.addEventListener('click', this.ws_.toggleZoom); this.setSizes_(div, wrap, elem); } @@ -2605,11 +2601,20 @@ var Zoom = function () { // Sets element size: window size - relative margins var scale = divCSS.width.includes('%') ? 100 / __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].parseSize(divCSS.width) : window.innerWidth / __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].parseSize(divCSS.width); - elem.el.style.width = window.innerWidth - marginW * scale + 'px'; - elem.el.style.height = window.innerHeight - marginH * scale + 'px'; - - // Because of flexbox, wrap height is required - wrap.style.height = window.innerHeight / scale + 'px'; + if (scale == 1) { + // If the scale is 100% means it is mobile + var wsW = this.ws_.el.clientWidth; + elem.el.style.width = (wsW - marginW) * 2 + 'px'; + elem.el.style.height = (wsW - marginH) * 1.5 + 'px'; + elem.el.style.minHeight = scale == 1 ? 'auto' : ''; + // Because of flexbox, wrap height is required + wrap.style.height = window.innerWidth / 1.5 + 'px'; + } else { + elem.el.style.width = window.innerWidth - marginW * scale + 'px'; + elem.el.style.height = window.innerHeight - marginH * scale + 'px'; + // Because of flexbox, wrap height is required + wrap.style.height = window.innerHeight / scale + 'px'; + } } /** diff --git a/static/js/webslides.min.js b/static/js/webslides.min.js index b53b12e..b9b6a51 100644 --- a/static/js/webslides.min.js +++ b/static/js/webslides.min.js @@ -1,9 +1,9 @@ /*! * Name: WebSlides * Version: 1.2.1 - * Date: 2017-04-09 + * Date: 2017-04-12 * Description: Making HTML presentations easy * URL: https://github.com/webslides/webslides#readme * Credits: @jlantunez, @LuisSacristan, @Belelros */ -!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/static/js/",t(t.s=5)}([function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(18),a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=document.createElement(e);return i.id=t,n&&(i.textContent=n),i}},{key:"once",value:function(e,t,n){var i=function i(o){o.target===e&&(e.removeEventListener(t,i),n(o))};e.addEventListener(t,i,!1)}},{key:"getTransitionEvent",value:function(){if(s)return s;for(var e=document.createElement("ws"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},n=Object.keys(t),i=0,o=n.length;i2&&void 0!==arguments[2]?arguments[2]:{},i=new o.a(t,{detail:n});e.dispatchEvent(i)}},{key:"toArray",value:function(e){return[].slice.call(e)}},{key:"isFocusableElement",value:function(){var e=!1;if(document.activeElement){var t="inherit"!==document.activeElement.contentEditable;e=["INPUT","SELECT","OPTION","TEXTAREA"].indexOf(document.activeElement.tagName)>-1||t}return e}},{key:"parseSize",value:function(e){return Number(e.replace(/[^\d\.]/g,""))}},{key:"wrap",value:function e(t,n){var e=document.createElement(n);return t.parentElement.insertBefore(e,t),e.appendChild(t),e}},{key:"after",value:function(e,t){var n=t.parentNode;n.lastChild==t?n.appendChild(e):n.insertBefore(e,t.nextSibling)}}]),e}();t.a=l},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoslide,o=void 0!==n&&n,a=t.changeOnClick,s=void 0!==a&&a,r=t.loop,l=void 0===r||r,c=t.minWheelDelta,h=void 0===c?40:c,d=t.scrollWait,f=void 0===d?450:d,v=t.slideOffset,y=void 0===v?50:v;if(i(this,e),this.el=document.getElementById("webslides"),!this.el)throw new Error("Couldn't find the webslides container!");this.isMoving=!1,this.slides=null,this.currentSlideI_=-1,this.currentSlide_=null,this.maxSlide_=0,this.isVertical=this.el.classList.contains(u.VERTICAL),this.plugins={},this.options={autoslide:o,changeOnClick:s,loop:l,minWheelDelta:h,scrollWait:f,slideOffset:y},this.initialised=!1,this.removeChildren_(),this.grabSlides_(),this.createPlugins_(),this.initSlides_(),this.onInit_()}return l(e,[{key:"removeChildren_",value:function(){for(var e=this.el.childNodes,t=e.length;t--;){var n=e[t];a.a.isCandidate(n)||this.el.removeChild(n)}}},{key:"createPlugins_",value:function(){var e=this;Object.keys(c).forEach(function(t){var n=c[t];e.plugins[t]=new n(e)})}},{key:"onInit_",value:function(){this.initialised=!0,s.a.fireEvent(this.el,"ws:init"),document.documentElement.classList.add(u.READY)}},{key:"grabSlides_",value:function(){this.slides=s.a.toArray(this.el.childNodes).map(function(e,t){return new a.a(e,t)}),this.maxSlide_=this.slides.length}},{key:"goToSlide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isValidIndexSlide_(e)&&!this.isMoving&&this.currentSlideI_!==e){this.isMoving=!0;var n=!1;null!==t?n=t:this.currentSlideI_>=0&&(n=e>this.currentSlideI_);var i=this.slides[e];null===this.currentSlide_||!this.isVertical||this.plugins.touch&&this.plugins.touch.isEnabled?this.transitionToSlide_(n,i,this.onSlideChange_):this.scrollTransitionToSlide_(n,i,this.onSlideChange_)}}},{key:"scrollTransitionToSlide_",value:function(e,t,i){var o=this;this.el.style.overflow="hidden",e?t.show():(t.moveBeforeFirst(),t.show(),n.i(r.a)(this.currentSlide_.el.offsetTop,0)),n.i(r.a)(t.el.offsetTop,500,function(){o.currentSlide_.hide(),e&&o.currentSlide_.moveAfterLast(),o.el.style.overflow="auto",setTimeout(function(){i.call(o,t)},150)})}},{key:"transitionToSlide_",value:function(e,t,i){var o=this;n.i(r.a)(0,0);var a="slideInRight";e||(t.moveBeforeFirst(),a="slideInLeft"),this.currentSlide_&&(e&&this.currentSlide_.moveAfterLast(),this.currentSlide_.hide()),t.show(),this.initialised&&this.plugins.touch&&this.plugins.touch.isEnabled?(s.a.once(t.el,s.a.getAnimationEvent(),function(){t.el.classList.remove(a),i.call(o,t)}),t.el.classList.add(a)):i.call(this,t)}},{key:"onSlideChange_",value:function(e){this.currentSlide_&&this.currentSlide_.disable(),this.currentSlide_=e,this.currentSlideI_=e.i,this.currentSlide_.enable(),this.isMoving=!1,s.a.fireEvent(this.el,"ws:slide-change",{slides:this.maxSlide_,currentSlide0:this.currentSlideI_,currentSlide:this.currentSlideI_+1})}},{key:"goNext",value:function(){var e=this.currentSlideI_+1;if(e>=this.maxSlide_){if(!this.options.loop)return;e=0}this.goToSlide(e,!0)}},{key:"goPrev",value:function(){var e=this.currentSlideI_-1;if(e<0){if(!this.options.loop)return;e=this.maxSlide_-1}this.goToSlide(e,!1)}},{key:"isValidIndexSlide_",value:function(e){return e>=0&&e=this.maxSlide_)&&(e=0),0!==e)for(var t=0;t0&&(this.interval_=setInterval(this.ws_.goNext.bind(this.ws_),e))}},{key:"stop",value:function(){this.interval_&&(clearInterval(this.interval_),this.interval_=null)}}]),e}();t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nMath.abs(t);if(this.isGoingUp_=t<0,this.isGoingLeft_=n<0,a){if(i)return;e.preventDefault()}(Math.abs(t)>=this.ws_.options.minWheelDelta||Math.abs(n)>=this.ws_.options.minWheelDelta)&&(a&&this.isGoingLeft_||!a&&this.isGoingUp_?this.ws_.goPrev():this.ws_.goNext(),e.preventDefault())}}}]),e}();t.a=r},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),a=n(3),s=function(){function e(e,t){for(var n=0;nMath.abs(t)&&(e<-this.ws_.options.slideOffset?this.ws_.goPrev():e>this.ws_.options.slideOffset&&this.ws_.goNext())}}}],[{key:"normalizeEventInfo",value:function(e){var t={pageX:0,pageY:0};return void 0!==e.changedTouches?t=e.changedTouches[0]:void 0!==e.originalEvent&&void 0!==e.originalEvent.changedTouches&&(t=e.originalEvent.changedTouches[0]),{x:e.offsetX||e.layerX||t.pageX,y:e.offsetY||e.layerY||t.pageY}}}]),e}();t.a=l},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),a=n(1),s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=e-a.scrollTop,s=a.scrollTop;if(!t)return a.scrollTop=e,void n();!function r(l){l+=16;var u=Math.min(1,l/t),c=o.a.swing(u,l*u,e,i,t);a.scrollTop=Math.floor(s+c*i),l1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=document.createElement(e);return i.id=t,n&&(i.textContent=n),i}},{key:"once",value:function(e,t,n){var i=function i(o){o.target===e&&(e.removeEventListener(t,i),n(o))};e.addEventListener(t,i,!1)}},{key:"getTransitionEvent",value:function(){if(s)return s;for(var e=document.createElement("ws"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},n=Object.keys(t),i=0,o=n.length;i2&&void 0!==arguments[2]?arguments[2]:{},i=new o.a(t,{detail:n});e.dispatchEvent(i)}},{key:"toArray",value:function(e){return[].slice.call(e)}},{key:"isFocusableElement",value:function(){var e=!1;if(document.activeElement){var t="inherit"!==document.activeElement.contentEditable;e=["INPUT","SELECT","OPTION","TEXTAREA"].indexOf(document.activeElement.tagName)>-1||t}return e}},{key:"parseSize",value:function(e){return Number(e.replace(/[^\d\.]/g,""))}},{key:"wrap",value:function e(t,n){var e=document.createElement(n);return t.parentElement.insertBefore(e,t),e.appendChild(t),e}},{key:"after",value:function(e,t){var n=t.parentNode;n.lastChild==t?n.appendChild(e):n.insertBefore(e,t.nextSibling)}}]),e}();t.a=l},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoslide,o=void 0!==n&&n,a=t.changeOnClick,s=void 0!==a&&a,r=t.loop,l=void 0===r||r,c=t.minWheelDelta,h=void 0===c?40:c,d=t.scrollWait,f=void 0===d?450:d,v=t.slideOffset,y=void 0===v?50:v;if(i(this,e),this.el=document.getElementById("webslides"),!this.el)throw new Error("Couldn't find the webslides container!");this.isMoving=!1,this.slides=null,this.currentSlideI_=-1,this.currentSlide_=null,this.maxSlide_=0,this.isVertical=this.el.classList.contains(u.VERTICAL),this.plugins={},this.options={autoslide:o,changeOnClick:s,loop:l,minWheelDelta:h,scrollWait:f,slideOffset:y},this.initialised=!1,this.removeChildren_(),this.grabSlides_(),this.createPlugins_(),this.initSlides_(),this.onInit_()}return l(e,[{key:"removeChildren_",value:function(){for(var e=this.el.childNodes,t=e.length;t--;){var n=e[t];a.a.isCandidate(n)||this.el.removeChild(n)}}},{key:"createPlugins_",value:function(){var e=this;Object.keys(c).forEach(function(t){var n=c[t];e.plugins[t]=new n(e)})}},{key:"onInit_",value:function(){this.initialised=!0,s.a.fireEvent(this.el,"ws:init"),document.documentElement.classList.add(u.READY)}},{key:"grabSlides_",value:function(){this.slides=s.a.toArray(this.el.childNodes).map(function(e,t){return new a.a(e,t)}),this.maxSlide_=this.slides.length}},{key:"goToSlide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isValidIndexSlide_(e)&&!this.isMoving&&this.currentSlideI_!==e){this.isMoving=!0;var n=!1;null!==t?n=t:this.currentSlideI_>=0&&(n=e>this.currentSlideI_);var i=this.slides[e];null===this.currentSlide_||!this.isVertical||this.plugins.touch&&this.plugins.touch.isEnabled?this.transitionToSlide_(n,i,this.onSlideChange_):this.scrollTransitionToSlide_(n,i,this.onSlideChange_)}}},{key:"scrollTransitionToSlide_",value:function(e,t,i){var o=this;this.el.style.overflow="hidden",e?t.show():(t.moveBeforeFirst(),t.show(),n.i(r.a)(this.currentSlide_.el.offsetTop,0)),n.i(r.a)(t.el.offsetTop,500,function(){o.currentSlide_.hide(),e&&o.currentSlide_.moveAfterLast(),o.el.style.overflow="auto",setTimeout(function(){i.call(o,t)},150)})}},{key:"transitionToSlide_",value:function(e,t,i){var o=this;n.i(r.a)(0,0);var a="slideInRight";e||(t.moveBeforeFirst(),a="slideInLeft"),this.currentSlide_&&(e&&this.currentSlide_.moveAfterLast(),this.currentSlide_.hide()),t.show(),this.initialised&&this.plugins.touch&&this.plugins.touch.isEnabled?(s.a.once(t.el,s.a.getAnimationEvent(),function(){t.el.classList.remove(a),i.call(o,t)}),t.el.classList.add(a)):i.call(this,t)}},{key:"onSlideChange_",value:function(e){this.currentSlide_&&this.currentSlide_.disable(),this.currentSlide_=e,this.currentSlideI_=e.i,this.currentSlide_.enable(),this.isMoving=!1,s.a.fireEvent(this.el,"ws:slide-change",{slides:this.maxSlide_,currentSlide0:this.currentSlideI_,currentSlide:this.currentSlideI_+1})}},{key:"goNext",value:function(){var e=this.currentSlideI_+1;if(e>=this.maxSlide_){if(!this.options.loop)return;e=0}this.goToSlide(e,!0)}},{key:"goPrev",value:function(){var e=this.currentSlideI_-1;if(e<0){if(!this.options.loop)return;e=this.maxSlide_-1}this.goToSlide(e,!1)}},{key:"isValidIndexSlide_",value:function(e){return e>=0&&e=this.maxSlide_)&&(e=0),0!==e)for(var t=0;t0&&(this.interval_=setInterval(this.ws_.goNext.bind(this.ws_),e))}},{key:"stop",value:function(){this.interval_&&(clearInterval(this.interval_),this.interval_=null)}}]),e}();t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nMath.abs(t);if(this.isGoingUp_=t<0,this.isGoingLeft_=n<0,a){if(i)return;e.preventDefault()}(Math.abs(t)>=this.ws_.options.minWheelDelta||Math.abs(n)>=this.ws_.options.minWheelDelta)&&(a&&this.isGoingLeft_||!a&&this.isGoingUp_?this.ws_.goPrev():this.ws_.goNext(),e.preventDefault())}}}]),e}();t.a=r},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),a=n(3),s=function(){function e(e,t){for(var n=0;nMath.abs(t)&&(e<-this.ws_.options.slideOffset?this.ws_.goPrev():e>this.ws_.options.slideOffset&&this.ws_.goNext())}}}],[{key:"normalizeEventInfo",value:function(e){var t={pageX:0,pageY:0};return void 0!==e.changedTouches?t=e.changedTouches[0]:void 0!==e.originalEvent&&void 0!==e.originalEvent.changedTouches&&(t=e.originalEvent.changedTouches[0]),{x:e.offsetX||e.layerX||t.pageX,y:e.offsetY||e.layerY||t.pageY}}}]),e}();t.a=l},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),a=n(1),s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=e-a.scrollTop,s=a.scrollTop;if(!t)return a.scrollTop=e,void n();!function r(l){l+=16;var u=Math.min(1,l/t),c=o.a.swing(u,l*u,e,i,t);a.scrollTop=Math.floor(s+c*i),l