How to use requireFailure in Hammer.js?

Asked

Viewed 36 times

1

I don’t know exactly how to define the element in which to apply my function in the Hammer.js frame. There in the API itself is passed the following syntax:

var horizontal = new Hammer.Pan({
    event: 'panh',
    direction: Hammer.DIRECTION_HORIZONTAL
});
var vertical = new Hammer.Pan({
    event: 'panv',
    direction: Hammer.DIRECTION_VERTICAL
});
vertical.requireFailure(horizontal);

I can’t imagine a way to apply this code to my project. I would like to have the effects on the element document.getElementById('hitArea'), if that can be useful.

  • What is the link to this Hammer.js API page?

  • http://hammerjs.github.io/getting-started/ or http://hammerjs.github.io/api/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.