Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taufik-nurrohman/rect
Document, element, mouse and window position and dimension helpers.
https://github.com/taufik-nurrohman/rect
dimension helper node offset position rect size utility
Last synced: about 2 months ago
JSON representation
Document, element, mouse and window position and dimension helpers.
- Host: GitHub
- URL: https://github.com/taufik-nurrohman/rect
- Owner: taufik-nurrohman
- License: mit
- Created: 2021-01-02T10:26:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-01T13:39:55.000Z (over 2 years ago)
- Last Synced: 2024-11-21T06:38:24.764Z (2 months ago)
- Topics: dimension, helper, node, offset, position, rect, size, utility
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Rect Utility
============Usage
-----### CommonJS
~~~ js
const {getOffset} = require('@taufik-nurrohman/rect');console.log(getOffset(document.querySelector('#pane')));
~~~### ECMAScript
~~~ js
import {getOffset} from '@taufik-nurrohman/rect';console.log(getOffset(document.querySelector('#pane')));
~~~Methods
-------### getAxis(event, node)
### getOffset(node)
### getRect(node)
### getSize(node)
### getScroll(node)
### setOffset(node, data)
### setSize(node, data)
### setScroll(node, data)