Giter Site home page Giter Site logo

lib-gesture's Introduction

#lib.gesture

最新版本

1.1.11

安装依赖

运行 npm install,来安装所需的依赖模块。关于NPM的知识,请参见nodejs;

用Grunt打包

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

如何使用

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

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

手势事件有:

  • tap 轻击
  • doubletap 快速双击
  • panstart 开始平移
  • horizontalpanstart 开始水平平移
  • verticalpanstart 开始垂直平移
  • pan 平移中
  • horizontalpan 水平平移中
  • verticalpan 垂直平移中
  • panend 平移结束
  • flick 轻弹
  • horizontalflick 水平轻弹
  • verticalflick 垂直轻弹
  • press 长按
  • pressend 长按结束

lib-gesture's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.