You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
402 B
15 lines
402 B
2 years ago
|
var $safeEls = require('./$safeEls');
|
||
|
exports = function(els) {
|
||
|
els = $safeEls(els);
|
||
|
var el = els[0];
|
||
|
var clientRect = el.getBoundingClientRect();
|
||
|
return {
|
||
|
left: clientRect.left + window.pageXOffset,
|
||
|
top: clientRect.top + window.pageYOffset,
|
||
|
width: Math.round(clientRect.width),
|
||
|
height: Math.round(clientRect.height)
|
||
|
};
|
||
|
};
|
||
|
|
||
|
module.exports = exports;
|