@instructure/ui-layout
Advanced tools
Comparing version 5.12.0 to 5.13.0-rc.2
@@ -143,2 +143,9 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
}, { | ||
key: 'normalizeScrollTop', | ||
value: function normalizeScrollTop(element) { | ||
// Account for cross browser differences with scrollTop attribute on the | ||
// body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938 | ||
return ownerDocument(this.node).body === element ? 0 : element.scrollTop; | ||
} | ||
}, { | ||
key: 'width', | ||
@@ -206,3 +213,3 @@ get: function get() { | ||
offsetY = offsetY + (parent.scrollTop - child.scrollTop); | ||
offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child)); | ||
offsetX = offsetX + (parent.scrollLeft - child.scrollLeft); | ||
@@ -232,3 +239,4 @@ } | ||
offsetX = offsetX + (child.left - parent.left); | ||
scrollY = scrollY + parents[i].scrollTop; | ||
scrollY = scrollY + this.normalizeScrollTop(parents[i]); | ||
} | ||
@@ -235,0 +243,0 @@ // Account for any scrolling on positioned parents |
@@ -175,2 +175,9 @@ 'use strict'; | ||
}, { | ||
key: 'normalizeScrollTop', | ||
value: function normalizeScrollTop(element) { | ||
// Account for cross browser differences with scrollTop attribute on the | ||
// body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938 | ||
return (0, _ownerDocument2.default)(this.node).body === element ? 0 : element.scrollTop; | ||
} | ||
}, { | ||
key: 'width', | ||
@@ -238,3 +245,3 @@ get: function get() { | ||
offsetY = offsetY + (parent.scrollTop - child.scrollTop); | ||
offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child)); | ||
offsetX = offsetX + (parent.scrollLeft - child.scrollLeft); | ||
@@ -264,3 +271,4 @@ } | ||
offsetX = offsetX + (child.left - parent.left); | ||
scrollY = scrollY + parents[i].scrollTop; | ||
scrollY = scrollY + this.normalizeScrollTop(parents[i]); | ||
} | ||
@@ -267,0 +275,0 @@ // Account for any scrolling on positioned parents |
{ | ||
"name": "@instructure/ui-layout", | ||
"version": "5.12.0", | ||
"version": "5.13.0-rc.2", | ||
"description": "A UI component library made by Instructure Inc.", | ||
@@ -25,5 +25,5 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-presets": "^5.12.0", | ||
"@instructure/ui-testbed": "^5.12.0", | ||
"@instructure/ui-themes": "^5.12.0", | ||
"@instructure/ui-presets": "^5.13.0-rc.2", | ||
"@instructure/ui-testbed": "^5.13.0-rc.2", | ||
"@instructure/ui-themes": "^5.13.0-rc.2", | ||
"postcss-mixins": "6.2.0", | ||
@@ -35,7 +35,7 @@ "postcss-simple-vars": "4.1.0", | ||
"dependencies": { | ||
"@instructure/ui-i18n": "^5.12.0", | ||
"@instructure/ui-motion": "^5.12.0", | ||
"@instructure/ui-portal": "^5.12.0", | ||
"@instructure/ui-themeable": "^5.12.0", | ||
"@instructure/ui-utils": "^5.12.0", | ||
"@instructure/ui-i18n": "^5.13.0-rc.2", | ||
"@instructure/ui-motion": "^5.13.0-rc.2", | ||
"@instructure/ui-portal": "^5.13.0-rc.2", | ||
"@instructure/ui-themeable": "^5.13.0-rc.2", | ||
"@instructure/ui-utils": "^5.13.0-rc.2", | ||
"classnames": "^2.2.5", | ||
@@ -51,3 +51,3 @@ "prop-types": "^15.5.10" | ||
}, | ||
"gitHead": "08d1b0bc6d70c6315bd174b63b9674d0fd919812" | ||
"gitHead": "55e5ed2cdbe106a7960f44ed948cea27afbee69f" | ||
} |
@@ -179,3 +179,3 @@ /* | ||
offsetY = offsetY + (parent.scrollTop - child.scrollTop) | ||
offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child)) | ||
offsetX = offsetX + (parent.scrollLeft - child.scrollLeft) | ||
@@ -204,3 +204,4 @@ } | ||
offsetX = offsetX + (child.left - parent.left) | ||
scrollY = scrollY + parents[i].scrollTop | ||
scrollY = scrollY + this.normalizeScrollTop(parents[i]) | ||
} | ||
@@ -214,2 +215,8 @@ // Account for any scrolling on positioned parents | ||
} | ||
normalizeScrollTop (element) { | ||
// Account for cross browser differences with scrollTop attribute on the | ||
// body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938 | ||
return ownerDocument(this.node).body === element ? 0 : element.scrollTop | ||
} | ||
} | ||
@@ -216,0 +223,0 @@ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
738278
13315
0
1