1.1.10 • Published 4 years ago

utilizes.offset v1.1.10

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

offset

Get the current offset of the given element

Usage: offset(item: Element | Partial<ClientRect> | Partial<DOMRect>): { top: number, left: number }

import { offset } from 'utilizes.offset'

const specialElement = document.getElementById('special-element')

offset(specialElement)
// Output the offset top and offset left of given element
offset(specialElement.getBoundingClientRect())
// also work

This module exported from utilizes project.

1.1.10

4 years ago

1.1.9

5 years ago

1.1.8

6 years ago

1.1.6

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.11

6 years ago

1.0.6

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago