Touch event hit testing & compatability
Hi Kinetic,
I love your product! But recently, I was using it with x-tag, and ran into problems due to how kinetic is detecting touch events during hit testing - see this issue over at x-tag for some discussion from them. The problem can be seen at this line in kinetic, where you check if evt.touches !== undefined; this works fine with stand-alone kinetic, but breaks with x-tag since x-tag assigns evt.touches = [], an empty array and not undefined for non-touch events.
Could an application of instanceof as recommended by @csuwildcat help kinetic have less conflicts here?
But TouchEvent is not defined in some browsers. http://caniuse.com/touch
@lavrton that's the whole point: if you check for the instance instead of duck-typing, you can avoid conflicts.