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

@any-touch/swipe

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-touch/swipe

any-touch的识别器, 用来识别划动手势.

  • 2.1.1
  • npm
  • Socket score

Version published
Weekly downloads
318
decreased by-19.49%
Maintainers
1
Weekly downloads
 
Created
Source

@any-touch/swipe

快划识别器.

安装

npm i -S @any-touch/swipe

快速开始

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

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

参数

名称数据类型默认值说明
nameString'swipe'自定义事件名称
pointLengthNumber1支持的触点数, 可支持多指触发
thresholdNumber10触点离开前, 按压移动的距离超过10px才能触发事件
velocityNumber0.3快划超过30px/ms才触发事件

FAQs

Package last updated on 08 Apr 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