animated-scroll-to
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -19,3 +19,3 @@ (function() { | ||
var defaultOptions = { | ||
var options = { | ||
speed: 500, | ||
@@ -29,8 +29,13 @@ minDuration: 250, | ||
var options = {}; | ||
var optionsKeys = Object.keys(options); | ||
Object.keys(defaultOptions).forEach(function(key) { | ||
options[key] = userOptions[key] ? userOptions[key] : defaultOptions[key]; | ||
}); | ||
// Override default options | ||
for (var i = 0; i < optionsKeys.length; i++) { | ||
var key = optionsKeys[i]; | ||
if (typeof userOptions[key] !== 'undefined') { | ||
options[key] = userOptions[key]; | ||
} | ||
} | ||
options.isWindow = options.element === window; | ||
@@ -37,0 +42,0 @@ |
{ | ||
"name": "animated-scroll-to", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Simple, plain JavaScript animated window scroll", | ||
@@ -5,0 +5,0 @@ "main": "animated-scroll-to.js", |
# animated-scroll-to | ||
[![npm version](https://img.shields.io/npm/v/animated-scroll-to.svg?style=flat-square)](https://www.npmjs.com/package/animated-scroll-to) | ||
[![npm downloads](https://img.shields.io/npm/dm/animated-scroll-to.svg?style=flat-square)](https://www.npmjs.com/package/animated-scroll-to) | ||
Animated JavaScript window and element scroll. | ||
@@ -4,0 +7,0 @@ Simple, plain JavaScript scrollTo function. |
Sorry, the diff of this file is not supported yet
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
19460
152
101