KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm just a lowly uC programmer who's trying to put together a little web interface for his boss. I've got everything working so far except being able to select a square on a canvas using touch input. This is on a Samsung Slate 7 tablet running Windows 8 and IE10 I've distilled the code down to pretty much the bare essentials here: var cxt; var c; window.onload = function () { c = document.getElementById('displayCanvas'); cxt = c.getContext('2d'); /* c.addEventListener("MSPointerUp", mouseUp, false); c.addEventListener("MSPointerMove", mouseMove, false); c.addEventListener("MSPointerDown", mouseDown, false); */ c.addEventListener("touchend", mouseUp, false) c.addEventListener("touchmove", mouseMove, false); c.addEventListener("touchstart", mouseDown, false); } function mouseDown(downE) { window.console && console.log("down"); }; function mouseMove(moveE){ window.console && console.log("move"); } function mouseUp() { window.console && console.log("end"); } I get both the start and end events, using both the MSPointer and the "normal" javascript touch events, however the "move" event doesn't register. I'm sure it's something really simple I'm missing here, thanks for helping me out!
Tags (comma-separated)
Save Edits
Cancel