javascript - requireFailure for vertical/horizontal pans with hammer.js on meteor -


i'm trying implement "cards" kind of interface this example hammer.js on meteor (the chriswessels:hammer-js package).

so far, i've got horizontal pans working can't vertical pans work along properly. somehow requirefailure won't work me , the vertical pans work after horizontal pan trigger (i'm trying have both directions work independently).

i have hammertoucharea so:

{{#hammertoucharea configurecallback=configurehammer gesturemap=templategestures}}     [...] {{/hammertoucharea}} 

and config code:

configurehammer: function () {     return function (hammer, t) {         var vertical = new hammer.pan({             event: 'panv',             direction: hammer.direction_vertical         });         var horizontal = new hammer.pan({             event: 'panh',             direction: hammer.direction_horizontal         });         vertical.requirefailure(horizontal);          hammer.add([vertical, horizontal]);          return hammer;     } }, 

and gestures this:

templategestures: {     'panleft .sliderh': function (e, t) {         //slide right     },     'panright .sliderh': function (e, t) {         //slide left     },     'panup .sliderh': function (e, t) {         //slide down     },     'pandown .sliderh': function (e, t) {         //slide     } } 

any ideas?

thank you!


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -