Socket
Socket
Sign inDemoInstall

@any-touch/pinch

Package Overview
Dependencies
1
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @any-touch/pinch

any-touch的识别器, 用来识别捏合手势.


Version published
Weekly downloads
212
increased by24.71%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@any-touch/pinch

缩放识别器.

安装

npm i -S @any-touch/pinch

快速开始

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

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

参数

名称数据类型默认值说明
nameString'pinch'自定义事件名称
pointLengthNumber2支持的触点数, 可支持多指拖拽
thresholdNumber0缩放超过0倍才触发pinch事件

FAQs

Last updated on 28 Apr 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc