element-position
Advanced tools
Comparing version 0.1.6 to 0.1.7
declare namespace Position { | ||
function getNestedOffset(el): { | ||
function getNestedOffset(el: Element): { | ||
top: number, | ||
@@ -7,8 +7,8 @@ left: number, | ||
bottom: number | ||
}; | ||
function getNestedScroll(el): { | ||
} | ||
function getNestedScroll(el: Element): { | ||
x: number, | ||
y: number | ||
}; | ||
function getAbsolute(el): { | ||
} | ||
function getAbsolute(el: Element): { | ||
top: number, | ||
@@ -18,4 +18,4 @@ left: number, | ||
bottom: number | ||
}; | ||
} | ||
} | ||
export = Position; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Position=e()}(this,function(){"use strict";function o(t){for(var e=t.offsetLeft,f=t.offsetTop,o=t.offsetLeft+t.offsetWidth,n=t.offsetTop+t.offsetHeight;t=t.offsetParent;)e+=t.offsetLeft,f+=t.offsetTop,o+=t.offsetLeft,n+=t.offsetTop;return{left:e,top:f,right:o,bottom:n}}function n(t){for(var e=0,f=0;t=t.parentElement;)e+=t.scrollLeft,f+=t.scrollTop;return{x:e,y:f}}return{getNestedOffset:o,getNestedScroll:n,getAbsolute:function(t){var e=o(t),f=n(t);return{left:e.left-f.x,top:e.top-f.y,right:e.right-f.x,bottom:e.bottom-f.y}}}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Position=e()}(this,function(){"use strict";var o={getNestedOffset:function(t){for(var e=t.offsetLeft,f=t.offsetTop,o=t.offsetLeft+t.offsetWidth,s=t.offsetTop+t.offsetHeight;t=t.parentElement;)e+=t.offsetLeft,f+=t.offsetTop,o+=t.offsetLeft,s+=t.offsetTop;return{left:e,top:f,right:o,bottom:s}}},s={getNestedScroll:function(t){for(var e=0,f=0;t=t.parentElement;)e+=t.scrollLeft,f+=t.scrollTop;return{x:e,y:f}}},t={getAbsolute:function(t){var e=o.getNestedOffset(t),f=s.getNestedScroll(t);return{left:e.left-f.x,top:e.top-f.y,right:e.right-f.x,bottom:e.bottom-f.y}}};return{getNestedOffset:o.getNestedOffset,getNestedScroll:s.getNestedScroll,getAbsolute:t.getAbsolute}}); |
{ | ||
"name": "element-position", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Calculates the position of the DOM.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
3269
23