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

gesturejs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gesturejs

gesturejs helps to recognize multiple screen touch gestures like pan, swipe, tap and longpress etc.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#lib-gesture

gesturejs helps to recognize multiple screen touch gestures like pan, swipe, tap and longpress etc.

最新版本

0.1.0

安装

npm install gesturejs

用Grunt打包

运行 grunt,来对项目进行打包。关于Grunt的知识,请参见gruntjs;

如何使用

引入js文件后,任何DOM结点都可以监听手势事件。例如:

document.querySelector('.viewport').addEventListener('pan', function(){
	console.log('getsture pan');
}, false);

手势事件有:

  • tap 轻击
  • doubletap 快速双击
  • panstart 开始平移
  • horizontalpanstart 开始水平平移
  • verticalpanstart 开始垂直平移
  • panmove 平移中
  • horizontalpan 水平平移中
  • verticalpan 垂直平移中
  • panend 平移结束
  • swipe 轻弹
  • horizontalswipe 水平轻弹
  • verticalswipe 垂直轻弹
  • longpress 长按
  • pressend 长按结束

npm版对原版lib-gesture所做的变动如下:

  • pan -> panmove
  • flick -> swipe
  • horizontalflick -> horizontalswipe
  • verticalflick -> verticalswipe
  • press -> longpress

Keywords

FAQs

Package last updated on 04 Apr 2016

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