https://github.com/ryanve/bounding
Normalized cross-browser getClientBoundingRect
https://github.com/ryanve/bounding
dom javascript
Last synced: 10 months ago
JSON representation
Normalized cross-browser getClientBoundingRect
- Host: GitHub
- URL: https://github.com/ryanve/bounding
- Owner: ryanve
- License: mit
- Created: 2016-09-18T18:55:36.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-28T07:13:48.000Z (almost 10 years ago)
- Last Synced: 2025-03-15T21:51:21.001Z (over 1 year ago)
- Topics: dom, javascript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/bounding
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bounding
Normalized cross-browser `element.getClientBoundingRect`
```sh
npm install bounding --save
```
```js
var bounding = require('bounding')
```
## API
### `bounding(element)`
Get a normalized plain object representing element's client bounding rectangle
```js
{
bottom: 118.875,
height: 97.4375,
left: 19.5,
right: 630.5,
top: 21.4375,
width: 611,
x: 19.5,
y: 21.4375
}
```
## License
MIT