# touch-finger

> [demo](https://uso.gitee.io/touch-finger/)

Latest version **1.0.8** (published 2018-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install touch-finger
pnpm add touch-finger
yarn add touch-finger
bun add touch-finger
```

## 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.8 |
| Published | 2018-11-22 |
| First published | 2018-11-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 785.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | edmund chen |
| Maintainers | edmund_chen |
| Keywords | touch-finger, touch-gesture, mobile-gesture, mobile-finger |

## Links

- npm: https://www.npmjs.com/package/touch-finger
- Repository: https://github.com/uso51984/touch-finger
- Homepage: https://github.com/uso51984/touch-finger#readme
- Issues: https://github.com/uso51984/touch-finger/issues
- npm.io page: https://npm.io/package/touch-finger

## Dependencies (1)

- [gulp-less](https://npm.io/package/gulp-less.md) ^4.0.1

## Recent versions

- 1.0.8 (latest) — 2018-11-22
- 1.0.7 — 2018-11-16
- 1.0.6 — 2018-11-15
- 1.0.4 — 2018-11-15
- 1.0.3 — 2018-11-15
- 1.0.2 — 2018-11-13
- 1.0.1 — 2018-11-12
- 1.0.0 — 2018-11-11

## README

# touchFinger

[demo](https://uso.gitee.io/touch-finger/)

## 安装
```
npm install touch-finger
```

## 引入方式

CommonJS 或者 es6引入方式
```js
  import touchFinger from 'touch-finger';
```

原始引入方式
```html
    <script type="text/javascript" src="touchFinger.js"></script>
```
> touchFinger.[min].js在dist目录

## 使用
```js
const fingerInstance = new touchFinger(element, {
  touchStart () { },
  touchMove () { },
  touchEnd:  function () { },
  touchCancel () { },
  multipointStart () { },
  multipointEnd () { },
  tap () { },
  doubleTap () { },
  longTap () { },
  singleTap () { },
  rotate (evt) {
    console.log(evt.angle);
  },
  pinch (evt) {
    console.log(evt.zoom);
  },
  pressMove (evt) {
    console.log(evt.pressMoveDirection);
    console.log(evt.deltaX);
    console.log(evt.deltaY);
  },
  swipe (evt) {
    console.log("swipe" + evt.direction);
  }
});

const onTap = function() {};

fingerInstance.on('tap', onTap);
fingerInstance.on('touchStart', function() {});
fingerInstance.off('tap', onTap);

fingerInstance.destroy();
```

## 联系

Email: usocjb@163.com
weixin: chenjianbin519846538

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