@odopod/odo-scroll-animation
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -9,3 +9,3 @@ /** | ||
* | ||
* @author Glen Cheney | ||
* @author Glen Cheney <glen@odopod.com> | ||
*/ | ||
@@ -38,3 +38,3 @@ | ||
* A map of request animation frame ids for each target. | ||
* @type {Map.<Element, number>} | ||
* @type {Map.<Element|Window, number>} | ||
* @private | ||
@@ -118,3 +118,3 @@ */ | ||
_handleTargetScrolled: function _handleTargetScrolled(evt) { | ||
var target = evt.currentTarget; | ||
var target = /** @type {Element|Window} */evt.currentTarget; | ||
@@ -134,3 +134,3 @@ // Cancel the last request animation frame if it hasn't executed yet. | ||
* Adds a scroll listener to a target. | ||
* @param {Element} target Element. | ||
* @param {Element|Window} target Element. | ||
* @private | ||
@@ -158,4 +158,4 @@ */ | ||
* page is scrolled. | ||
* @param {Element=} target Optional element. Default = window. | ||
* @param {function(number)} fn Callback method with the new scroll top | ||
* @param {Element|Window|function(number):void} target Optional element. Default = window. | ||
* @param {function(number):void} [fn] Callback method with the new scroll top | ||
* value as the first parameter. | ||
@@ -162,0 +162,0 @@ * @return {string} Id to unbind with. |
@@ -15,3 +15,3 @@ (function (global, factory) { | ||
* | ||
* @author Glen Cheney | ||
* @author Glen Cheney <glen@odopod.com> | ||
*/ | ||
@@ -44,3 +44,3 @@ | ||
* A map of request animation frame ids for each target. | ||
* @type {Map.<Element, number>} | ||
* @type {Map.<Element|Window, number>} | ||
* @private | ||
@@ -124,3 +124,3 @@ */ | ||
_handleTargetScrolled: function _handleTargetScrolled(evt) { | ||
var target = evt.currentTarget; | ||
var target = /** @type {Element|Window} */evt.currentTarget; | ||
@@ -140,3 +140,3 @@ // Cancel the last request animation frame if it hasn't executed yet. | ||
* Adds a scroll listener to a target. | ||
* @param {Element} target Element. | ||
* @param {Element|Window} target Element. | ||
* @private | ||
@@ -164,4 +164,4 @@ */ | ||
* page is scrolled. | ||
* @param {Element=} target Optional element. Default = window. | ||
* @param {function(number)} fn Callback method with the new scroll top | ||
* @param {Element|Window|function(number):void} target Optional element. Default = window. | ||
* @param {function(number):void} [fn] Callback method with the new scroll top | ||
* value as the first parameter. | ||
@@ -168,0 +168,0 @@ * @return {string} Id to unbind with. |
{ | ||
"name": "@odopod/odo-scroll-animation", | ||
"description": "Performant scroll listeners.", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"main": "dist/odo-scroll-animation.js", | ||
"module": "dist/odo-scroll-animation.esm.js", | ||
"odoModule": "src/scroll-animation.js", | ||
"types": "index.d.ts", | ||
"sideEffects": false, | ||
@@ -20,3 +21,4 @@ "author": "Odopod", | ||
"dist", | ||
"src" | ||
"src", | ||
"index.d.ts" | ||
], | ||
@@ -23,0 +25,0 @@ "odoKeywords": [ |
@@ -9,3 +9,3 @@ /** | ||
* | ||
* @author Glen Cheney | ||
* @author Glen Cheney <glen@odopod.com> | ||
*/ | ||
@@ -38,3 +38,3 @@ | ||
* A map of request animation frame ids for each target. | ||
* @type {Map.<Element, number>} | ||
* @type {Map.<Element|Window, number>} | ||
* @private | ||
@@ -115,3 +115,3 @@ */ | ||
_handleTargetScrolled(evt) { | ||
const target = evt.currentTarget; | ||
const target = /** @type {Element|Window} */ (evt.currentTarget); | ||
@@ -130,3 +130,3 @@ // Cancel the last request animation frame if it hasn't executed yet. | ||
* Adds a scroll listener to a target. | ||
* @param {Element} target Element. | ||
* @param {Element|Window} target Element. | ||
* @private | ||
@@ -152,4 +152,4 @@ */ | ||
* page is scrolled. | ||
* @param {Element=} target Optional element. Default = window. | ||
* @param {function(number)} fn Callback method with the new scroll top | ||
* @param {Element|Window|function(number):void} target Optional element. Default = window. | ||
* @param {function(number):void} [fn] Callback method with the new scroll top | ||
* value as the first parameter. | ||
@@ -156,0 +156,0 @@ * @return {string} Id to unbind with. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
49666
10
575