HotStudio / touchy

jQuery plugin for touch events
touchyjs.org/
Other
357 stars 108 forks source link

Touchy 1.1: request for feedback #1

Open fisherwebdev opened 12 years ago

fisherwebdev commented 12 years ago

Here are some ideas for improving Touchy. Please let me know how this list should be prioritized or expanded.

Thanks! ~ Bill

  1. move all touchy data into the event object
  2. more cross-browser support
  3. integration with tools like grunt, npm, etc.
  4. making Touchy more compliant with trends in jQuery plugin best practices (this is a direction, not a destination)
  5. support for double tap, or the other TODO features laid out in the comments at the beginning of the code.
  6. support for binding mouse events and touch events with a single line of code ("press" and "release" instead of touchstart/mousedown, etc.)
  7. support for both mouse events and touch events on the same device (thinking in terms of laptops that have touchscreens -- the issue is to be able to handle both in the same environment.)
  8. removing jQuery as a dependency, because jQuery is a bit bloated for mobile
  9. a second sister project with a lot of common event handler code
  10. some better way of facilitating delegation -- currently, Touchy is not event-delegation-friendly.
  11. returning the angle that a drag is performed in (this is a user-requested feature)
  12. create array of formerly touched x/y point data (user-requested feature)
  13. configuration setting on a per-element basis, rather that global (user-requested feature)
  14. specify the minimal distance before a drag is considered a drag on a per associated element basis -- see #13 (user-requested feature)
  15. element time for double-tap, see #13 (user-requested feature)
  16. multi-tap, like three taps (user-requested feature)
  17. some kind of tooling/logging add-on, providing insight into the data produced by the touch interactions (user-requested feature)
fisherwebdev commented 12 years ago

Seems like integration with IE10 / Metro would be a high priority. Some docs on that here: http://blogs.msdn.com/b/ie/archive/2011/09/20/touch-input-for-ie10-and-metro-style-apps.aspx

ghost commented 12 years ago

Support for mouse and touch events on the same device, the Surface tablet and removing jQuery dependancy seem like top priorities. The next things to include with Touchy listed above are all excellent, however the user-requested-features would help to keep Touchy immediately useful while the other changes evolve Touchy with best practices and alongside touch enabled devices.

fisherwebdev commented 12 years ago

Another idea: Touchy as a modular system, with separate files for swipe, drag, etc. This would let you only include what you are using, and get the file size down by 0.5K or so, after gzip. This would also free up Touchy to offer more functionality. We would be free to add a lot of stuff, and not worry as much about bloating the file size.

nxtwrld commented 12 years ago

Hi,thanks for the great work! Removing jQuery would be my favorite. I am using Zepto for most projects and I am trying to get my head around rewriting the special event dependency.

dapinitial commented 11 years ago

I think there may be some issues with the event bubbling when in the wheel example I can have

  • About
  • in there and they will click through while I am spinning. Not sure, I haven't really looked at your source but maybe a boolean flag like spinning = false; and this.didSpin = false; then if spinning e.stopPropagation, will need to set it up like this too: this.element.addEventListener( 'touchstart' , function touchStart( e ) { onMouseDown(this, e); } , true ); this.element.addEventListener( 'touchmove', function touchMove ( e ) { onMouseMove(this, e) }, true); this.element.addEventListener( 'touchend', function touchEnd ( e ) { onMouseUp(this, e) }, true);

    devinrhode2 commented 11 years ago

    removing the jQuery dependency is interesting. It could be good to preserve some code to easily hook up the events with the jQuery api