Socket
Socket
Sign inDemoInstall

@any-touch/press

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-touch/press

any-touch的识别器, 用来识别按压手势.


Version published
Weekly downloads
91
decreased by-64.17%
Maintainers
1
Weekly downloads
 
Created
Source

@any-touch/press

按压识别器.

安装

npm i -S @any-touch/press

快速开始

// 只加载press识别器(按压)
import Core from '@any-touch/core';
import press from '@any-touch/press';
const at = new Core(el);
at.use(press, 参数)

// 按压
at.on('press', (event) => {
    // event包含位置/速度/方向等信息
});

参数

名称数据类型默认值说明
nameString'press'自定义事件名称
pointLengthNumber1支持的触点数, 可支持多指按压
maxDistanceNumber9触点允许移动的最大距离
minPressTimeNumber251触发事件需要按压的最小时间

FAQs

Package last updated on 24 May 2022

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