Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@any-touch/tap

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-touch/tap

any-touch的识别器, 用来识别点击手势.

  • 0.8.0
  • npm
  • Socket score

Version published
Weekly downloads
267
decreased by-30.29%
Maintainers
1
Weekly downloads
 
Created
Source

@any-touch/tap

点击识别器.

快速开始

// 只加载tap识别器(拖拽)
import Core from '@any-touch/core';
import Tap from '@any-touch/tap';
Core.use(Tap, 参数)
const at = new Core(el);
// 拖拽
at.on('tap', (ev) => {
    // ev包含位置/速度/方向等信息
});

⚠️注意: 执行npm i any-touch后, @any-touch/core和@any-touch/tap便已自动安装, 直接引入即可.

参数

名称数据类型默认值说明
nameString'tap'自定义事件名称
pointLengthNumber2支持的触点数, 可支持多指拖拽
tapTimesNumber1连续点击指定次数触发
waitNextTapTimeNumber300最多等待下一次点击时间,超时识别器状态变为"失败"
maxDistanceNumber2从接触到离开允许产生的最大距离
tapTmaxDistanceFromPrevTapimesNumber92次点击之间允许的最大位移
maxPressTimeNumber250从接触到离开屏幕的最大容忍时间

FAQs

Package last updated on 14 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc