
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@any-touch/tap
Advanced tools
点击识别器.
// 只加载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便已自动安装, 直接引入即可.
名称 | 数据类型 | 默认值 | 说明 |
---|---|---|---|
name | String | 'tap' | 自定义事件名称 |
pointLength | Number | 2 | 支持的触点数, 可支持多指拖拽 |
tapTimes | Number | 1 | 连续点击指定次数触发 |
waitNextTapTime | Number | 300 | 最多等待下一次点击时间,超时识别器状态变为"失败" |
maxDistance | Number | 2 | 从接触到离开允许产生的最大距离 |
tapTmaxDistanceFromPrevTapimes | Number | 9 | 2次点击之间允许的最大位移 |
maxPressTime | Number | 250 | 从接触到离开屏幕的最大容忍时间 |
FAQs
any-touch的识别器, 用来识别点击手势.
The npm package @any-touch/tap receives a total of 170 weekly downloads. As such, @any-touch/tap popularity was classified as not popular.
We found that @any-touch/tap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.