<commit_before># Hammer.js 

## An easy-to-use javascript library for multi touch gestures

> I told you, homeboy /
> You *CAN* touch this /
> Yeah, that's how we living and you know /
> You *CAN* touch this

Hammer.js is a javascript library (that depends on jQuery) that can be used to control gestures on touch devices. It supports the following gestures:

- Tap
- Double tap
- Hold
- Drag
- Transform

## Documentation
> So wave your hands in the air /
> Bust a few moves /
> Run your fingers through your hair

A step by step guide on how to use hammer.js:

* [Download the hammer javascript] or clone the latest version from our github repository:

```$ git clone <EMAIL>:jtangelder/hammer.js.git```

* Import jquery and import hammer.js in your project:
    
```<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="hammer.js"></script>```

* Hammertime! Bind hammer to a container element:

```var hammer = new Hammer("#container");```

Now, on every gesture that is performed on the container element, you'll receive a callback object with information on the gesture.

### The Hammer callback objects:

All gestures return:

- Event: The original jQuery event (targetElement, etc.).
- Position: An object with the x and y position of the gesture. (e.g. the position of a tap and the center position of a transform)
- Touches: An array of touches, containing an object with the x and the y position for every finger.

Besides these, the Transform gesture also returns:

- Scale: The distance between two fingers since the start of an event as a multiplier of the initial distance. The initial value is 1.0. If less than 1.0 the gesture is pinch close to zoom out. If greater than 1.0 the gesture is pinch open to zoom in.
- Rotation: A delta rotation since the start of an event in degrees where clockwise is positive and counter-clockwise is negative. The initial value is 0.0.

The Drag gesture also returns:

- Direction: up|right|down|left
- Distance: An …
- Angle: The angle of the drag movement in degrees (up = 360/0, right = 90, down = 180, left = 270)

Something about start and end events?

### Requirements and compatibility
Hammer.js requires jQuery for simple event binding and for the position of the container element.

Hammer.js has been tested on iPad1 with iOS5, iPhone4 with iOS5, Samsung Galaxy S with Android 2.3.3 and Google Chrome 17. On a desktop browser the mouse can be used to simulate touch events with one finger. On Android 2 (and 3?) the default browser doesn't support multi-touch events, so there's no transform callback on Android.

Not all gestures are supported on every device. This matrix shows the support we have tested. This is ofcourse far from extensive. If you've tested hammer.js on a different device, please let us know.

| *Gesture/ Device* | iPad iOS5 | iPhone iOS5 | Android 2.2.3 | ? |
|:-----------|:--------:|:---------|:---------|:--|
| Tap        | X        | X        | X        | ? |
| Hold       | X        | X        | X        | ? |
| Double Tap | X        | X        | X        | ? |
| Transform  | X        | X        |          | ? |
| Drag       | X        | X        | X        | ? |


## Demo's
> While it's rollin', hold on /
> Pump a little bit and let 'em know it's goin' on /
> Like that, like that

We've created some demo's to show you the immense power of hammer.js:

### Basic demo
A simple demo that demonstrates that hammer.js works and is able to recognize gestures. We output the gestures that are recognized. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Slideshow
A slideshow that uses hammer to switch slides. Note that the drag event in the slideshow is non-blocking for the scrolling of the page. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Colors!
kleurenbolletjes?

### Pinch to zoom
We use hammer to zoom in and out on an image by pinching. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Lightbox
We use hammer.js to close a lightbox by pinching it. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Videoplayer / Google maps threshold
We use hammer.js to differentiate between an intentional interaction with a videoplayer or a google maps element and i.e. a scroll gesture. Without this differentiation it's easy to get stuck in such an element, especially when it takes up a large part of your browser window. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

## Further notes
Created by [<NAME>angelder] and developed further by everyone at [Eight Media] in Arnhem, the Netherlands.

Add your feature suggestions and bug reports on [Github].

We recommend listening to [this loop] while using hammer.js.

  [Download]: https://github.com/jtangelder/hammer.js/zipball/master
  [eight media]: http://www.eight.nl/
  [j. tangelder]: http://twitter.com/jorikdelaporik
  [github]: http://github.com/eightmedia/hammer.js/issues
  [this loop]: http://soundcloud.com/eightmedia/hammerfreak
<commit_msg>further improvements of readme<commit_after># Hammer.js 

## A javascript library for multi-touch gestures

> I told you, homeboy /
> You *CAN* touch this /
> Yeah, that's how we living and you know /
> You *CAN* touch this

Hammer.js is a javascript library (that depends on jQuery) that can be used to control gestures on touch devices. It supports the following gestures:

- Tap
- Double tap
- Hold
- Drag
- Transform

## Documentation
> So wave your hands in the air /
> Bust a few moves /
> Run your fingers through your hair

A step by step guide on how to use hammer.js:

* [Download the hammer javascript](https://github.com/EightMedia/hammer.js/zipball/master) or clone the latest version from our github repository:

```$ git clone <EMAIL>:eightmedia/hammer.js.git```

* Import jquery and import hammer.js in your project:
    
```<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="hammer.js"></script>```

* Hammertime! Bind hammer to a container element:

```var hammer = new Hammer("#container");```

Now, on every gesture that is performed on the container element, you'll receive a callback object with information on the gesture.

### The Hammer callback objects:

All gestures return:

- Event: The original jQuery event (targetElement, etc.).
- Position: An object with the x and y position of the gesture (e.g. the position of a tap and the center position of a transform).
- Touches: An array of touches, containing an object with the x and the y position for every finger.

Besides these, the Transform gesture returns:

- Scale: The distance between two fingers since the start of an event as a multiplier of the initial distance. The initial value is 1.0. If less than 1.0 the gesture is pinch close to zoom out. If greater than 1.0 the gesture is pinch open to zoom in.
- Rotation: A delta rotation since the start of an event in degrees where clockwise is positive and counter-clockwise is negative. The initial value is 0.0.

The Drag gesture also returns:

- Direction: up|right|down|left
- Distance: An …
- Angle: The angle of the drag movement in degrees (up = 360/0, right = 90, down = 180, left = 270)

Something about start and end events?

### Requirements and compatibility
Hammer.js requires jQuery for simple event binding and for the position of the container element.

Hammer.js has been tested on iPad1 with iOS5, iPhone4 with iOS5, Samsung Galaxy S with Android 2.3.3 and Google Chrome 17. On a desktop browser the mouse can be used to simulate touch events with one finger. On Android 2 (and 3?) the default browser doesn't support multi-touch events, so there's no transform callback on Android.

Not all gestures are supported on every device. This matrix shows the support we have tested. This is ofcourse far from extensive. If you've tested hammer.js on a different device, please let us know.

| *Gesture/ Device* | iPad iOS5 | iPhone iOS5 | Android 2.2.3 | ? |
|:-----------|:--------:|:---------|:---------|:--|
| Tap        | X        | X        | X        | ? |
| Hold       | X        | X        | X        | ? |
| Double Tap | X        | X        | X        | ? |
| Transform  | X        | X        |          | ? |
| Drag       | X        | X        | X        | ? |

## Demo's
> While it's rollin', hold on /
> Pump a little bit and let 'em know it's goin' on /
> Like that, like that

We've created some demo's to show you the immense power of hammer.js:

### Basic demo
A simple demo that demonstrates that hammer.js works and is able to recognize gestures. We output the gestures that are recognized. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Slideshow
A slideshow that uses hammer to switch slides. Note that the drag event in the slideshow is non-blocking for the scrolling of the page. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Colors!
kleurenbolletjes?

### Pinch to zoom
We use hammer to zoom in and out on an image by pinching. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Lightbox
We use hammer.js to close a lightbox by pinching it. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

### Videoplayer / Google maps threshold
We use hammer.js to differentiate between an intentional interaction with a videoplayer or a google maps element and i.e. a scroll gesture. Without this differentiation it's easy to get stuck in such an element, especially when it takes up a large part of your browser window. [Check it out](http://jtangelder.github.com/hammer.js/demo.html)

## Further notes
Created by [<NAME>](http://twitter.com/jorikdelaporik) and developed further by everyone at [Eight Media](http://www.eight.nl/) in Arnhem, the Netherlands.

Add your feature suggestions and bug reports on [Github](http://github.com/eightmedia/hammer.js/issues).

We recommend listening to [this loop](http://soundcloud.com/eightmedia/hammerhammerhammer) while using hammer.js.

{'fraction_non_alphanumeric': 0.09755366949575636, 'fraction_numerical': 0.007388916625062406, 'mean_word_length': 3.362369337979094, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 35, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5944895', 'n_tokens_mistral': 2946, 'n_tokens_neox': 2730, 'n_words': 1341}