Any ideas on how to implement a 'touchMoveOver' event in Javascript?

Posted by gargantaun on Stack Overflow See other posts from Stack Overflow or by gargantaun
Published on 2010-05-02T22:18:09Z Indexed on 2010/05/02 22:28 UTC
Read the original article Hit count: 341

Filed under:
|
|

I'm faffing around with SVG, specifically for web content aimed at iPad users. I've created a little dial type thingy that I'm calling a "cheese board" that I'd like to use as an interface element.

http://appliedworks.co.uk/files/times/SVGTests/raphael.html

Clicking on a piece of cheese (to keep the analogy going) will do "something". That bit's easy. However, I'd like the user to be able to drag their finger around the 'cheese board', firing a new event (touchesMovedOver?) every time they their finger moves over a new piece of cheese. But I can't figure out how to do it since there's no 'mouseOver' equivalent for touch interfaces.

If the whole thing was made of squares, I could have created some sort of 'rectContainsPoint' method to be called for every 'touchesMoved', but that approach wouldn't work here.

If anyone has any idea about how something like this could be achieved, I'd love to hear it.

© Stack Overflow or respective owner

Related posts about svg

Related posts about JavaScript