PhoneGap Cordova Hammer.js HTML5/Javascript Canvas - "Tap" doesn't work properly -


i trying make app using phonegap/cordova/hammer.js via html5/javascript/canvas:

var c = document.getelementbyid("mycanvas"); var ctx = c.getcontext("2d"); hammer(c).on("tap", function(event){ /*do simple*/ });` 

i using <canvas id="mycanvas"> tag in html.

now problem: tap works once in while (maybe once every 5-10 taps), , find "hotspots" works multiple times in row, reason "hotpot" randomly changes after while. whats going on?

also i'm trying use "pinch" can't work @ all. want simple "zoom in" => count++; "zoom out" => count--;

i'm big amateur , appreciated.

try creating div lives above canvas , attach tap event there instead. i've had problems in past events directly on canvas element.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -