@hackkun/touch
Advanced tools
Comparing version 1.0.19 to 1.0.20
{ | ||
"name": "@hackkun/touch", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "手势库", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "6fee36134bbfff5e8b200a09523f12e153b59bb3" | ||
"gitHead": "dd5c46a6dddb6a74836e4ce568bdc035db2d45c7" | ||
} |
# `@hackkun/touch` | ||
> touch event | ||
> 手势库,支持移动端和 PC 端,只支持 import 方式引用 | ||
> 移动端事件:start end tap singleTap doubleTap longTap drag swipe pinch rotate | ||
> PC 端事件:start end tap singleTap doubleTap longTap drag swipe wheelStart wheel wheelEnd | ||
> 自定义 event 扩展了: | ||
> drag 下 deltaX,deltaY | ||
> swipe 下 Left Right Up Down | ||
> wheel 和 pinch 下 ratio | ||
@@ -8,3 +14,5 @@ ## Usage | ||
``` | ||
import { HackTouchMobile, HackTouchPc } from '@hackkun/touch' | ||
const ht = new HackTouchMobile(idName) | ||
ht.on(EventName, (Event) => {}) | ||
``` |
12073
18