javascript - How to build a panel that detects both swipe and click events -


using dojo.gesture.swipe i'd able listen swipe event on panel , change it's content accordingly:

on(mypanel, swipe.end, lang.hitch(this, function(e) {     if (e.dx < -100) {                               //do         e.stoppropagation();         event.stop(e);     } })); 

this piece of code working fine detect swipe event , if swipe movement big enough.

however on panel have other listeners on buttons click not work anymore:

on(mybutton, 'click', lang.hitch(this, 'onmybuttonclick'))`); 

any idea go wrong ?

thanxs

i missing listener on 'tap' event :

on(mybutton, tap, lang.hitch(this, onmybuttonclick)); 

that means when using dojo.gesture, 1 should listen click , tap event if targeting both touch , classic screen.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -