rombdn / img-touch-canvas

Add touch gestures (pinch zoom) to images based on Canvas (vanilla HTML5 / JS)
MIT License
148 stars 110 forks source link

Using toDataURL makes imgtouchcanvas irresponsive #2

Closed fredericoschardong closed 11 years ago

fredericoschardong commented 11 years ago

When using toDataURL as here: setInterval(function(){document.getElementById("img_canvas").toDataURL()}, 1000); makes imgtouchcanvas irresponsive in the millisecond that toDataURL is called.

If the user is touching the canvas (zooming, moving) in the exact time that toDataURL is called then it has to stop touching and start touching again to regain control.

fredericoschardong commented 11 years ago

Playing and debugging a bit with toDataURL it seems that the problem is with toDataURL itself. Using .toDataURL('image/jpeg', 0.3) I got results decent enough.