element-position
Advanced tools
Comparing version 0.3.2 to 0.3.3
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.ElementPosition = factory()); | ||
}(this, (function () { 'use strict'; | ||
(global = global || self, global.ElementPosition = factory()); | ||
}(this, function () { 'use strict'; | ||
@@ -15,8 +15,3 @@ function getNestedOffset(el) { | ||
} | ||
return { | ||
left: left, | ||
top: top, | ||
right: right, | ||
bottom: bottom | ||
}; | ||
return { left: left, top: top, right: right, bottom: bottom }; | ||
} | ||
@@ -30,6 +25,3 @@ | ||
} | ||
return { | ||
x: x, | ||
y: y | ||
}; | ||
return { x: x, y: y }; | ||
} | ||
@@ -61,2 +53,2 @@ | ||
}))); | ||
})); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ElementPosition=e()}(this,function(){"use strict";function f(t){for(var e=t.offsetLeft,o=t.offsetTop,f=t.offsetLeft+t.offsetWidth,s=t.offsetTop+t.offsetHeight;t=t.offsetParent;)e+=t.offsetLeft,o+=t.offsetTop,f+=t.offsetLeft,s+=t.offsetTop;return{left:e,top:o,right:f,bottom:s}}function s(t){for(var e=0,o=0;t=t.parentElement;)e+=t.scrollLeft,o+=t.scrollTop;return{x:e,y:o}}var t={getNestedOffset:f,getNestedScroll:s,getCoordinates:function(t){var e=f(t),o=s(t);return{left:e.left-o.x,top:e.top-o.y,right:e.right-o.x,bottom:e.bottom-o.y}}};return{getNestedOffset:t.getNestedOffset,getNestedScroll:t.getNestedScroll,getCoordinates:t.getCoordinates}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ElementPosition=e()}(this,function(){"use strict";function f(t){for(var e=t.offsetLeft,o=t.offsetTop,f=t.offsetLeft+t.offsetWidth,s=t.offsetTop+t.offsetHeight;t=t.offsetParent;)e+=t.offsetLeft,o+=t.offsetTop,f+=t.offsetLeft,s+=t.offsetTop;return{left:e,top:o,right:f,bottom:s}}function s(t){for(var e=0,o=0;t=t.parentElement;)e+=t.scrollLeft,o+=t.scrollTop;return{x:e,y:o}}var t={getNestedOffset:f,getNestedScroll:s,getCoordinates:function(t){var e=f(t),o=s(t);return{left:e.left-o.x,top:e.top-o.y,right:e.right-o.x,bottom:e.bottom-o.y}}};return{getNestedOffset:t.getNestedOffset,getNestedScroll:t.getNestedScroll,getCoordinates:t.getCoordinates}}); |
{ | ||
"name": "element-position", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Calculates the position of the DOM.", | ||
@@ -20,4 +20,4 @@ "main": "dist/index.min.js", | ||
"tslib": "^1.9.3", | ||
"typescript": "^3.1.4", | ||
"rollup": "^0.66.6", | ||
"typescript": "^3.2.2", | ||
"rollup": "^1.0.1", | ||
"rollup-plugin-uglify": "^6.0.0", | ||
@@ -32,5 +32,3 @@ "rollup-plugin-typescript": "^1.0.0" | ||
"position", | ||
"DOM", | ||
"element", | ||
"html", | ||
"front-end", | ||
@@ -37,0 +35,0 @@ "coordinates", |
@@ -11,2 +11,6 @@ # Element Position | ||
or | ||
[Download js file and import your project!](https://github.com/TroyTae/element-position/tree/master/dist) | ||
## Documentation | ||
@@ -13,0 +17,0 @@ [Please see the detailed document here!](https://troytae.github.io/element-position) |
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
8876
22
67