Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)