# @any-touch/pan

> any-touch的识别器, 用来识别拖拽手势.

Latest version **2.2.0** (published 2022-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @any-touch/pan
pnpm add @any-touch/pan
yarn add @any-touch/pan
bun add @any-touch/pan
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2022-05-24 |
| First published | 2020-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | any86 |
| Maintainers | russell-ne |

## Links

- npm: https://www.npmjs.com/package/@any-touch/pan
- npm.io page: https://npm.io/package/@any-touch/pan

## Dependencies (2)

- [@any-touch/shared](https://npm.io/package/@any-touch/shared.md) ^2.2.0
- [@any-touch/compute](https://npm.io/package/@any-touch/compute.md) ^2.2.0

## Recent versions

- 2.2.0 (latest) — 2022-05-24
- 2.0.3-alpha.0 (next) — 2022-01-18
- 2.1.3 — 2022-05-24
- 2.1.2 — 2022-04-28
- 2.1.1 — 2022-04-08
- 2.1.0 — 2022-04-02
- 2.0.3 — 2022-03-30
- 2.0.3-2.0.3-alpha.1.0 — 2022-03-30
- 2.0.2 — 2022-01-06
- 2.0.2-alpha.1 — 2022-01-06
- 2.0.2-alpha.0 — 2022-01-06
- 2.0.1 — 2021-12-29
- 2.0.1-alpha.0 — 2021-12-28
- 2.0.0 — 2021-12-28
- 2.0.0-alpha.4 — 2021-12-02
- … 67 more at https://npm.io/package/@any-touch/pan/versions

## README

# @any-touch/pan
**拖拽**识别器.

## 安装
```shell
npm i -S @any-touch/pan
```

## 快速开始
```javascript
// 只加载pan识别器(拖拽)
import Core from '@any-touch/core';
import pan from '@any-touch/pan';
const at = new Core(el);
at.use(pan, 参数)

// 拖拽
at.on('pan', (event) => {
    // event包含位置/速度/方向等信息
});
```

## 参数
|名称|数据类型|默认值|说明|
|---|---|---|---|
|name|`String`|'pan'|自定义事件名称|
|pointLength|`Number`|1|支持的触点数, 可支持多指拖拽|
|threshold| `Number`|10|拖拽超过10px后触发pan事件|

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