hammerjs
A javascript library for multi-touch gestures
Last updated 9 years ago by arschmitz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install hammerjs 
SYNC missed versions from official npm registry.

Hammer.js 2.0.6

Build Status

Support, Questions, and Collaboration

Slack Status

Documentation

Visit hammerjs.github.io for detailed documentation.

// get a reference to an element
var stage = document.getElementById('stage');

// create a manager for that element
var mc = new Hammer.Manager(stage);

// create a recognizer
var Rotate = new Hammer.Rotate();

// add the recognizer
mc.add(Rotate);

// subscribe to events
mc.on('rotate', function(e) {
    // do something cool
    var rotation = Math.round(e.rotation);    
    stage.style.transform = 'rotate('+rotation+'deg)';
});

An advanced demo is available here: http://codepen.io/runspired/full/ZQBGWd/

Contributing

Read the contributing guidelines.

For PRs.

  • Use Angular Style commit messages
  • Rebase your PR branch when necessary
  • If you add a feature or fix a bug, please add or fix any necessary tests.
  • If a new feature, open a docs PR to go with.

Building

You can get the pre-build versions from the Hammer.js website, or do this by yourself running npm install -g grunt-cli && npm install && grunt build

Current Tags

  • 2.0.8                                ...           latest (9 years ago)

23 Versions

  • 2.0.8                                ...           9 years ago
  • 2.0.7                                ...           9 years ago
  • 2.0.6                                ...           9 years ago
  • 2.0.5                                ...           9 years ago
  • 2.0.4                                ...           10 years ago
  • 2.0.3                                ...           10 years ago
  • 2.0.2                                ...           11 years ago
  • 2.0.1                                ...           11 years ago
  • 2.0.0                                ...           11 years ago
  • 1.1.3                                ...           11 years ago
  • 1.0.11                                ...           11 years ago
  • 1.1.2                                ...           11 years ago
  • 1.1.1                                ...           11 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.10                                ...           11 years ago
  • 1.0.9                                ...           11 years ago
  • 1.0.8                                ...           11 years ago
  • 1.0.3-dev                                ...           11 years ago
  • 1.0.6                                ...           11 years ago
  • 1.0.5                                ...           12 years ago
  • 1.0.4                                ...           12 years ago
  • 1.0.3                                ...           12 years ago
  • 1.0.2                                ...           12 years ago
Downloads
Today 0
This Week 0
This Month 23
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (14)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |