scrollwatch
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "scrollwatch", | ||
"version": "1.0.0", | ||
"main": "./dist/ScrollWatch-1.0.0.min.js", | ||
"version": "1.2.0", | ||
"description": "Easily add lazy loading, infinite scrolling, or any other dynamic interaction based on scroll position (with no dependencies).", | ||
"main": "./dist/ScrollWatch-1.2.0.min.js", | ||
"moduleType": ["globals", "amd", "node"], | ||
"authors": "Evan Dull <evandull@gmail.com>", | ||
"homepage": "https://edull24.github.io/ScrollWatch/", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/edull24/ScrollWatch.git" | ||
}, | ||
"ignore": [], | ||
@@ -6,0 +15,0 @@ "keywords": [ |
{ | ||
"name": "scrollwatch", | ||
"version": "1.1.0", | ||
"author": "Evan Dull <evandull@gmail.com>", | ||
"description": "Easily add lazy loading, infinite scrolling, or any other dynamic interaction based on scroll position (with no dependencies).", | ||
"main": "./dist/ScrollWatch-1.1.0.min.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/edull24/ScrollWatch.git" | ||
}, | ||
"keywords": [ | ||
"javascript", | ||
"lazy load", | ||
"infinite scroll", | ||
"library", | ||
"scroll watch", | ||
"scroll" | ||
], | ||
"devDependencies": { | ||
"del": "^1.1.1", | ||
"gulp": "^3.8.11", | ||
"gulp-header": "^1.2.2", | ||
"gulp-load-plugins": "^0.8.0", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-rev": "^3.0.1", | ||
"gulp-sourcemaps": "^1.3.0", | ||
"gulp-uglify": "^1.1.0", | ||
"gulp-umd": "^0.1.3", | ||
"gulp-util": "^3.0.3", | ||
"require-dir": "^0.1.0" | ||
}, | ||
"license": "MIT" | ||
"name": "scrollwatch", | ||
"version": "1.2.0", | ||
"author": "Evan Dull <evandull@gmail.com>", | ||
"description": "Easily add lazy loading, infinite scrolling, or any other dynamic interaction based on scroll position (with no dependencies).", | ||
"main": "./dist/ScrollWatch-1.2.0.min.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/edull24/ScrollWatch.git" | ||
}, | ||
"keywords": [ | ||
"javascript", | ||
"lazy load", | ||
"infinite scroll", | ||
"library", | ||
"scroll watch", | ||
"scroll" | ||
], | ||
"devDependencies": { | ||
"del": "^1.1.1", | ||
"gulp": "^3.8.11", | ||
"gulp-header": "^1.2.2", | ||
"gulp-load-plugins": "^0.8.0", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-rev": "^3.0.1", | ||
"gulp-sourcemaps": "^1.3.0", | ||
"gulp-uglify": "^1.1.0", | ||
"gulp-umd": "^0.1.3", | ||
"gulp-util": "^3.0.3", | ||
"require-dir": "^0.1.0" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -9,4 +9,2 @@ 'use strict'; | ||
var ignoreClass = 'scroll-watch-ignore'; | ||
var config = { | ||
@@ -19,2 +17,3 @@ // The default container is window, but we need the actual | ||
inViewClass: 'scroll-watch-in-view', | ||
ignoreClass: 'scroll-watch-ignore', | ||
debounce: false, | ||
@@ -73,7 +72,7 @@ debounceTriggerLeading: false, | ||
threshhold = threshhold || 250; | ||
var last; | ||
var deferTimer; | ||
threshhold = threshhold || 250; | ||
return function () { | ||
@@ -187,3 +186,3 @@ | ||
instanceData[this._id].elements = Array.prototype.slice.call(document.querySelectorAll(instanceData[this._id].config.watch + ':not(.' + ignoreClass + ')')); | ||
instanceData[this._id].elements = Array.prototype.slice.call(document.querySelectorAll(instanceData[this._id].config.watch + ':not(.' + instanceData[this._id].config.ignoreClass + ')')); | ||
@@ -267,3 +266,3 @@ }; | ||
el.classList.add(ignoreClass); | ||
el.classList.add(config.ignoreClass); | ||
@@ -377,5 +376,5 @@ } | ||
var size = { | ||
w: instanceData[this._id].config.container.clientWidth, | ||
h: instanceData[this._id].config.container.clientHeight | ||
}; | ||
w: instanceData[this._id].config.container.clientWidth, | ||
h: instanceData[this._id].config.container.clientHeight | ||
}; | ||
@@ -416,5 +415,5 @@ return size; | ||
var range = { | ||
x: {}, | ||
y: {} | ||
}; | ||
x: {}, | ||
y: {} | ||
}; | ||
var scrollPos = getScrollPosition.call(this); | ||
@@ -440,5 +439,5 @@ var viewportSize = getViewportSize.call(this); | ||
var range = { | ||
x: {}, | ||
y: {} | ||
}; | ||
x: {}, | ||
y: {} | ||
}; | ||
var viewableRange = getViewableRange.call(this); | ||
@@ -445,0 +444,0 @@ var coords = el.getBoundingClientRect(); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
63353
884
0