
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
Advanced tools
:wave: 一个手势库
npm i -S any-touch
import AnyTouch from 'any-touch';
// 初始化
const el = doucument.getElementById('gesture-box');
const at = new AnyTouch(el);
// 绑定手势
at.on('pan', ev=>{
console.log(ev.deltaX);
})
// 解除绑定
at.off('pan')
// 销毁
at.destory();
// 自定义一个双击识别器
const tap2 = new AnyTouch.TapRecognizer({
name: 'doubletap',
pointer: 1,
taps: 2
});
// 添加自定义手势
const el = doucument.getElementById('gesture-box');
const at = new AnyTouch(el);
at.add(tap2);
at.on('tap2', ev=>{
console.log(ev);
});
// 一般情况下不期望双击时触发单击,
// 所以要声明单击的触发一定要等待(一段时间内)双击没有触发(失败)才可以
const tap1 = anyTouch.get('tap');
tap1.requireFailure(tap2);
FAQs
The npm package any-touch receives a total of 149 weekly downloads. As such, any-touch popularity was classified as not popular.
We found that any-touch 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.