@glitchr/stickyjs 1.0.43 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/js/sticky.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/stickyjs",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "Sticky scroll library",
5
5
  "main": "src/index.js",
6
6
  "repository": {
package/src/js/sticky.js CHANGED
@@ -707,6 +707,8 @@ $.fn.serializeObject = function () {
707
707
 
708
708
  if(speed) {
709
709
 
710
+ var distanceX = 0, distanceY = 0;
711
+
710
712
  var currentScrollX = $(el)[0].scrollLeft;
711
713
  if(currentScrollX < scrollLeft || scrollLeft == 0) // Going to the right
712
714
  distanceX = Math.abs(scrollLeft - currentScrollX);