# global-offset

> Element global offset

Latest version **0.1.7** (published 2017-04-25) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install global-offset
pnpm add global-offset
yarn add global-offset
bun add global-offset
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2017-04-25 |
| First published | 2015-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrey Polischuk |
| Maintainers | andrepolischuk |
| Keywords | element, global, offset |

## Links

- npm: https://www.npmjs.com/package/global-offset
- Repository: https://github.com/andrepolischuk/global-offset
- Issues: https://github.com/andrepolischuk/global-offset/issues
- npm.io page: https://npm.io/package/global-offset

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.1.7 (latest) — 2017-04-25
- 0.1.6 — 2016-05-30
- 0.1.5 — 2016-02-24
- 0.1.4 — 2016-01-22
- 0.1.3 — 2015-09-09
- 0.1.2 — 2015-07-07
- 0.1.1 — 2015-06-30
- 0.1.0 — 2015-06-30

## README

# global-offset [![Build Status][travis-image]][travis-url]

> Element global offset

Calculate offset of element with any `position` property.

## Install

```sh
npm install --save global-offset
```

## Usage

```js
import offset from 'global-offset';

offset(document.querySelector('.hello')); // {left: 150, top: 0}
```

## API

### offset(element)

Return object with `top` and `left` offsets.

#### element

Type: `element`

Element for calculate offsets.

## Related

* [coordinates][coordinates] — calculate relative coordinates
* [is-pointer-inside][is-pointer-inside] — check if pointer is inside the element
* [is-pointer-near][is-pointer-near] — check if pointer is near the element

## License

MIT

[travis-url]: https://travis-ci.org/andrepolischuk/global-offset
[travis-image]: https://travis-ci.org/andrepolischuk/global-offset.svg?branch=master

[coordinates]: https://github.com/andrepolischuk/coordinates
[is-pointer-inside]: https://github.com/andrepolischuk/is-pointer-inside
[is-pointer-near]: https://github.com/andrepolischuk/is-pointer-near

---
_Source: https://npm.io/package/global-offset · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
