diff --git a/index.js b/index.js index 5e652a2..e635f39 100644 --- a/index.js +++ b/index.js @@ -12,9 +12,10 @@ function getSize(el) { } } + var boundingRect = el.getBoundingClientRect(); return { - width: el.offsetWidth, - height: el.offsetHeight + width: boundingRect.width, + height: boundingRect.height, } }