wookiehangover/backbone.hammer.js — pull request #1 by ullmark (2013-09-09 17:31:44+00:00)
Title: Fixes issue with unnecessary hammers.

Hi,
I noticed after I started using *backbone.hammer.js* that all elements that had a Backbone View attached to them had some weird style attribute added.

```html
style=-"webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"`.
```

After some digging I found that `undelegateHammerEvents` calls the `hammer` function even when no **hammerEvents** exist on the view (which creates hammer on *this.$el*).

I solved it as simple I could think of by just adding a boolean to keep track if the hammer have been created by the `delegateHammerEvents` call.

If you rather not use an extra property I guess we could always change it to:

```js
if ('hammer' in this.$el.data()) {
...
}
```

but I reasoned (without measuring) that a boolean is performance-wise better.