get-element-center
v1.1.0
Published
get the x,y coordinates of an element's center.
Downloads
19
Maintainers
Readme
get-element-center
get the x,y coordinates of an element's center.
Installation
$ npm install get-element-center
Usage
var getElementCenter = require('get-element-center');
var box = document.querySelector('.box')
getElementCenter(box) // {x: 100, y: 300}
License
MIT