# inertia-roll

> Inertial scrolling under dragging scene

Latest version **1.0.1** (published 2022-07-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install inertia-roll
pnpm add inertia-roll
yarn add inertia-roll
bun add inertia-roll
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-07-28 |
| First published | 2022-07-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Endsion |
| Maintainers | endsion |
| Keywords | scroll, drag, ts, js, typescript, inertial |

## Links

- npm: https://www.npmjs.com/package/inertia-roll
- Repository: https://github.com/Endsion/inertiaScroll
- Homepage: https://github.com/Endsion/inertiaScroll#readme
- Issues: https://github.com/Endsion/inertiaScroll/issues
- npm.io page: https://npm.io/package/inertia-roll

## Recent versions

- 1.0.1 (latest) — 2022-07-28
- 1.0.0 — 2022-07-28

## README

# inertia-roll
Inertial scrolling under dragging scene.
When the mouse moves into the upper or lower part of the container, it will scroll automatically


## Installing
```bash
npm i -S inertia-roll
```

## Usage
```javascript
import { initScroll, setScroll, release } from 'inertia-roll';
// init
initScroll(el,false)
// Set whether scrolling is allowed
setScroll(allow)
// release
release() // true
```

## API

### Options
| Field | Type | Default value | Mutable (by `initScroll()`) | Description |
| ------- | --------- | ----------- | ---- | ---------------------------------------- |
| `el` | `Object` (dom node) | null | No | DOM node to listen `mouse` event on. |
| `allow` | `Boolean` | true | No | This initial value represents whether scrolling is allowed |

### Instance methods
| Method | Description |
| ------- | ---------------------------------------- |
| `setScroll()` | Set allowed scrolling status. |
| `release()` | Restore state. |

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