@glitchr/transparent 1.0.60 → 1.0.62

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/transparent",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "description": "Transparent SPA Application",
5
5
  "main": "src/index.js",
6
6
  "access": "public",
@@ -578,7 +578,7 @@ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addE
578
578
  }
579
579
  }
580
580
 
581
- closestEl = $(el).closest("a");
581
+ var closestEl = $(el).closest("a");
582
582
  if(!closestEl.length) closestEl = $(el).closest("button");
583
583
  if(!closestEl.length) closestEl = $(el).closest("input");
584
584
  if (closestEl.length) el = closestEl[0];
@@ -977,19 +977,19 @@ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addE
977
977
  var maxScrollY = $(el).prop("scrollHeight") - Math.round($(el).prop("clientHeight"));
978
978
  if (maxScrollY == 0) maxScrollY = Math.round($(el).prop("clientHeight"));
979
979
 
980
- scrollTop = Math.max(0, Math.min(dict["top"] ?? $(el).prop("scrollTop"), maxScrollY));
981
- scrollLeft = Math.max(0, Math.min(dict["left"] ?? $(el).prop("scrollLeft"), maxScrollX));
980
+ var scrollTop = Math.max(0, Math.min(dict["top"] ?? $(el).prop("scrollTop"), maxScrollY));
981
+ var scrollLeft = Math.max(0, Math.min(dict["left"] ?? $(el).prop("scrollLeft"), maxScrollX));
982
982
 
983
- speed = parseFloat(dict["speed"] ?? 0);
984
- easing = dict["easing"] ?? "swing";
985
- debounce = dict["debounce"] ?? 0;
983
+ var speed = parseFloat(dict["speed"] ?? 0);
984
+ var easing = dict["easing"] ?? "swing";
985
+ var debounce = dict["debounce"] ?? 0;
986
986
 
987
- duration = 1000*Transparent.parseDuration(dict["duration"] ?? 0);
988
- durationX = 1000*Transparent.parseDuration(dict["duration-x"] ?? dict["duration"] ?? 0);
989
- durationY = 1000*Transparent.parseDuration(dict["duration-y"] ?? dict["duration"] ?? 0);
987
+ var duration = 1000*Transparent.parseDuration(dict["duration"] ?? 0);
988
+ var durationX = 1000*Transparent.parseDuration(dict["duration-x"] ?? dict["duration"] ?? 0);
989
+ var durationY = 1000*Transparent.parseDuration(dict["duration-y"] ?? dict["duration"] ?? 0);
990
990
 
991
991
  if(speed) {
992
-
992
+
993
993
  var currentScrollX = $(el)[0].scrollLeft;
994
994
  if(currentScrollX < scrollLeft || scrollLeft == 0) // Going to the right
995
995
  distanceX = Math.abs(scrollLeft - currentScrollX);
@@ -1322,7 +1322,7 @@ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addE
1322
1322
  var scrollableElements = Transparent.getScrollableElement();
1323
1323
  var scrollableElementsXY = Transparent.getResponsePosition(uuid);
1324
1324
 
1325
- for(i = 0; i < scrollableElements.length; i++) {
1325
+ for(var i = 0; i < scrollableElements.length; i++) {
1326
1326
 
1327
1327
  var el = scrollableElements[i];
1328
1328
  var positionXY = undefined;
@@ -1460,7 +1460,7 @@ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addE
1460
1460
  var elementsXY = [];
1461
1461
  var elements = Transparent.getScrollableElement();
1462
1462
 
1463
- for(i = 0; i < elements.length; i++)
1463
+ for(var i = 0; i < elements.length; i++)
1464
1464
  elementsXY.push([$(elements[i]).scrollTop(), $(elements[i]).scrollLeft()]);
1465
1465
 
1466
1466
  return elementsXY;
@@ -1600,7 +1600,7 @@ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addE
1600
1600
  var responseURL;
1601
1601
  responseURL = xhr !== null ? xhr.responseURL : url.href;
1602
1602
 
1603
- responseText = Transparent.getResponseText(uuid);
1603
+ var responseText = Transparent.getResponseText(uuid);
1604
1604
 
1605
1605
  var fragmentPos = responseURL.indexOf("#");
1606
1606
  var strippedResponseUrl = (fragmentPos < 0 ? responseURL : responseURL.substring(0, fragmentPos)).trimEnd("/");