From 31160817967a69ff66b16b0757e02c2bdcd05870 Mon Sep 17 00:00:00 2001 From: Muhittin Tan Date: Fri, 22 Mar 2019 10:52:55 +0300 Subject: [PATCH] working --- dist/js/nova-scroll-top.js | 2 +- resources/js/nova-scroll-top.js | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dist/js/nova-scroll-top.js b/dist/js/nova-scroll-top.js index fc16239..8c62f21 100644 --- a/dist/js/nova-scroll-top.js +++ b/dist/js/nova-scroll-top.js @@ -1 +1 @@ -!function(e){var n={};function t(o){if(n[o])return n[o].exports;var l=n[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},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,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(2),l=t.n(o);Nova.booting(function(e,n){Nova.booting(function(e,n){n.beforeEach(function(e,n,t){setTimeout(function(){l()(0)},100),t()})})})},function(e,n,t){(function(){"use strict";function t(e){for(var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],t={speed:500,minDuration:250,maxDuration:1500,cancelOnUserAction:!0,element:window,horizontal:!1,onComplete:void 0,passive:!0,offset:0},o=Object.keys(t),l=0;lm&&(e=m);var u=e-s;if(0!==u){var a=Math.abs(Math.round(u/1e3*t.speed));at.maxDuration&&(a=t.maxDuration);var f=Date.now(),w=null,v=null,p={passive:t.passive};t.cancelOnUserAction?(v=function(){h(),cancelAnimationFrame(w)},window.addEventListener("keydown",v,p),window.addEventListener("mousedown",v,p)):(v=function(e){e.preventDefault()},window.addEventListener("scroll",v,p)),window.addEventListener("wheel",v,p),window.addEventListener("touchstart",v,p);var h=function(){window.removeEventListener("wheel",v,p),window.removeEventListener("touchstart",v,p),t.cancelOnUserAction?(window.removeEventListener("keydown",v,p),window.removeEventListener("mousedown",v,p)):window.removeEventListener("scroll",v,p)},g=function(){var n=Date.now()-f,o=n/a-1,l=o*o*o+1,i=Math.round(s+u*l),c=function(e){t.isWindow?t.horizontal?t.element.scrollTo(e,d):t.element.scrollTo(d,e):t.horizontal?t.element.scrollLeft=e:t.element.scrollTop=e};nm&&(e=m);var u=e-s;if(0!==u){var a=Math.abs(Math.round(u/1e3*t.speed));at.maxDuration&&(a=t.maxDuration);var f=Date.now(),w=null,v=null,p={passive:t.passive};t.cancelOnUserAction?(v=function(){h(),cancelAnimationFrame(w)},window.addEventListener("keydown",v,p),window.addEventListener("mousedown",v,p)):(v=function(e){e.preventDefault()},window.addEventListener("scroll",v,p)),window.addEventListener("wheel",v,p),window.addEventListener("touchstart",v,p);var h=function(){window.removeEventListener("wheel",v,p),window.removeEventListener("touchstart",v,p),t.cancelOnUserAction?(window.removeEventListener("keydown",v,p),window.removeEventListener("mousedown",v,p)):window.removeEventListener("scroll",v,p)},g=function(){var n=Date.now()-f,o=n/a-1,l=o*o*o+1,i=Math.round(s+u*l),c=function(e){t.isWindow?t.horizontal?t.element.scrollTo(e,d):t.element.scrollTo(d,e):t.horizontal?t.element.scrollLeft=e:t.element.scrollTop=e};n { - Nova.booting((Vue, router) => { - router.beforeEach(function (to, from, next) { - setTimeout(() => { - animateScrollTo(0); - }, 100); - next(); - }); + router.beforeEach(function (to, from, next) { + setTimeout(() => { + animateScrollTo(0); + }, 100); + next(); }); });