center-center 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +5 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -55,11 +55,11 @@ export function getViewportRect () {
55
55
  */
56
56
  export function getElementRect (element) {
57
57
  const {
58
- width,
59
- height,
60
- left,
61
- top
62
- } = element.getBoundingClientRect()
58
+ offsetWidth: width,
59
+ offsetHeight: height,
60
+ offsetLeft: left,
61
+ offsetTop: top
62
+ } = element
63
63
 
64
64
  return {
65
65
  width,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "center-center",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Position an element at the center center of a container",
5
5
  "main": "./index.mjs",
6
6
  "type": "module",