Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@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 226 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.