MCPcopy Index your code
hub / github.com/hammerjs/hammer.js

github.com/hammerjs/hammer.js @v2.0.8

repository ↗ · DeepWiki ↗ · release v2.0.8 ↗ · Ask this repo → · + Follow
576 symbols 1,528 edges 43 files 256 documented · 44% 2 cross-repo links updated 6mo ago★ 24,356285 open issues
README

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

Core symbols most depended-on inside this repo

expect
called by 109
tests/unit/assets/blanket.js
match
called by 85
tests/unit/assets/blanket.js
lex
called by 45
tests/unit/assets/blanket.js
throwError
called by 39
tests/unit/assets/blanket.js
escapeText
called by 31
tests/unit/assets/qunit.js
throwErrorTolerant
called by 27
tests/unit/assets/blanket.js
lookahead
called by 22
tests/unit/assets/blanket.js
slice
called by 21
tests/unit/assets/lodash.compat.js

Shape

Function 576

Languages

TypeScript100%

Modules by API surface

tests/unit/assets/lodash.compat.js151 symbols
tests/unit/assets/blanket.js133 symbols
tests/unit/assets/jquery.min.js63 symbols
hammer.js63 symbols
hammer.min.js62 symbols
tests/unit/assets/qunit.js32 symbols
src/utils.js19 symbols
src/input.js14 symbols
src/recognizer.js5 symbols
src/input/touchmouse.js5 symbols
tests/unit/test_utils.js3 symbols
src/touchaction.js3 symbols

Dependencies from manifests, versioned

changelogplease1.2.0 · 1×
git-tags0.2.4 · 1×
grunt0.4.x · 1×
grunt-banner0.2.3 · 1×
grunt-contrib-concat0.4.x · 1×
grunt-contrib-connect0.7.x · 1×
grunt-contrib-jshint0.10.x · 1×
grunt-contrib-qunit0.5.1 · 1×
grunt-contrib-uglify0.7.x · 1×
grunt-jscs0.8.0 · 1×
grunt-string-replace0.2.7 · 1×

For agents

$ claude mcp add hammer.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact