This pull request improves the event-move module, and is the first step towards having better gesture events in YUI, as discussed in this YUI-Contrib post.
As I mentioned in the YUIContrib post, it's important for YUI to have abstracted low-level start/move/end events. Originally, I was going to write these from scratch, but upon thinking about it more, this idea was already encapsulated within the event-move module. Unfortunately, it hadn't received some love in a while, so that's what I did here. No point creating new modules which duplicated the logic that was present in event-move. I just took what was in here and made it better.
Yes, there is the problem of someone not being able to subscribe to gesturemove if they don't subscribe to gesturemovestart as well, but this isn't really a problem because they can just set standAlone: true. In fact, maybe standAlone should be true by default. Not sure what you guys think about that. I didn't change that in this PR because it's a little outside the scope of it.
minTime = 0
minDistance = 0
minTime > 0
minDistance > 0
This module has 90%+ test coverage. Some of the code is skipped on non-MSPointer environments, so test in IE10 for maximum coverage. Looking at the skipped lines though, they aren't areas which should give bugs. I can improve the coverage more if needed, but wanted to get the code out so it could be reviewed.
I tested this code on:
Going forward, I want to improve the event-flick and add a few more gesture events to the library. We can use event-move as the de-facto low-level abstracted input event layer for YUI.
This is just so that I don't forget.
initial commit of dual-listener support for event-move
Fix detaching of move listeners when minDistance is specified
improve how event-move behaves when minDistance is set
improve gestures manual test
event-move: fix indexOf() check
event-move: improve event-gestures unit tests
Up the coverage to 90%+ on all browsers
make unit tests a little more flexible
Has anyone had a chance to look at this?
Would your Hammer.js work render this out of date @tilomitra ?