vue-scrollto
Advanced tools
Comparing version 2.6.8 to 2.6.9
{ | ||
"name": "vue-scrollto", | ||
"version": "2.6.8", | ||
"version": "2.6.9", | ||
"description": "Adds a directive that listens for click events and scrolls to elements.", | ||
@@ -5,0 +5,0 @@ "main": "vue-scrollto.js", |
@@ -165,2 +165,7 @@ # vue-scrollto | ||
#### cancelable | ||
Indicates if user can cancel the scroll or not. | ||
*Default:* `true` | ||
#### onDone | ||
@@ -167,0 +172,0 @@ A callback function that should be called when scrolling has ended. |
@@ -19,2 +19,3 @@ import BezierEasing from "bezier-easing"; | ||
offset: 0, | ||
cancelable: true, | ||
onDone: false, | ||
@@ -34,2 +35,3 @@ onCancel: false | ||
let offset; // offset to be added (subtracted) | ||
let cancelable; // indicates if user can cancel the scroll or not. | ||
let onDone; // callback when scrolling is done | ||
@@ -46,2 +48,3 @@ let onCancel; // callback when scrolling is canceled / aborted | ||
let abortFn = e => { | ||
if (!cancelable) return; | ||
abortEv = e; | ||
@@ -123,2 +126,3 @@ abort = true; | ||
offset = options.offset || defaults.offset; | ||
cancelable = options.cancelable || defaults.cancelable; | ||
onDone = options.onDone || defaults.onDone; | ||
@@ -125,0 +129,0 @@ onCancel = options.onCancel || defaults.onCancel; |
@@ -166,6 +166,7 @@ (function (global, factory) { | ||
var defaults$$1 = { | ||
container: 'body', | ||
container: "body", | ||
duration: 500, | ||
easing: "ease", | ||
offset: 0, | ||
cancelable: true, | ||
onDone: false, | ||
@@ -185,2 +186,3 @@ onCancel: false | ||
var offset = void 0; // offset to be added (subtracted) | ||
var cancelable = void 0; // indicates if user can cancel the scroll or not. | ||
var onDone = void 0; // callback when scrolling is done | ||
@@ -197,2 +199,3 @@ var onCancel = void 0; // callback when scrolling is canceled / aborted | ||
var abortFn = function abortFn(e) { | ||
if (!cancelable) return; | ||
abortEv = e; | ||
@@ -273,2 +276,3 @@ abort = true; | ||
offset = options.offset || defaults$$1.offset; | ||
cancelable = options.cancelable || defaults$$1.cancelable; | ||
onDone = options.onDone || defaults$$1.onDone; | ||
@@ -275,0 +279,0 @@ onCancel = options.onCancel || defaults$$1.onCancel; |
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
25914
544
199