transcroll
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -38,2 +38,3 @@ var easings = { | ||
* @param {Element|Window} el container element. Default: window | ||
* @param {Number} offset offset target position to this value. Default: 0 | ||
* @param {string} axis 'x' or 'y' axis. Default: 'y' | ||
@@ -49,5 +50,9 @@ * @param {number} duration animation duration in ms. Default: 200 | ||
*/ | ||
function transcroll(target, ref) { | ||
function transcroll( | ||
target, | ||
ref | ||
) { | ||
if ( ref === void 0 ) ref = {}; | ||
var el = ref.el; if ( el === void 0 ) el = window; | ||
var offset = ref.offset; if ( offset === void 0 ) offset = 0; | ||
var axis = ref.axis; if ( axis === void 0 ) axis = 'y'; | ||
@@ -90,3 +95,3 @@ var duration = ref.duration; if ( duration === void 0 ) duration = 200; | ||
maxPosition() | ||
)); | ||
)) + offset; | ||
@@ -93,0 +98,0 @@ var data = { |
{ | ||
"name": "transcroll", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Animate scroll in a modern way", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/mrTimofey/transcroll", |
@@ -25,3 +25,6 @@ # Transcroll | ||
el: window, | ||
// target position offset | ||
offset: 0, | ||
// scrolling axis, 'x' or 'y' | ||
@@ -28,0 +31,0 @@ axis: 'y', |
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
6886
127
62