richardscarrott / jquery-ui-carousel

jQuery RS Carousel is a responsive and touch-enabled carousel written on top of jQuery and the jQuery UI Widget Factory providing a full and familiar API in less than 2.6kB minified and gzipped.
http://richardscarrott.github.io/jquery-ui-carousel/
192 stars 56 forks source link

Corrected a bug in touch extension, some README.md changes #36

Closed V-Alexeev closed 11 years ago

richardscarrott commented 12 years ago

Hi there,

Thanks for updating the docs, I'll merge them in shortly but before I do this can you explain a bit more about the touch extension fix (https://github.com/V-Alexeev/jquery-ui-carousel/commit/d07bade0c0bf70f6f03ffa6be78788744c13a417)

The PageX and PageY are returned from jquery.event.drag.js but you're going back to the non-normalized event to retrieve the position; to me this sounds like you've come across a bug with the drag event rather than the carousel?

V-Alexeev commented 12 years ago

Hi,

sorry for the long delay.

I'm not sure what's the source of the problem, I didn't investigate it long enough, but the event of type "draggable3dstart" which is handled in the function just doesn't have pageX and pageY fields (I've tested it in several browsers). Only the originalEvent (which is of type "dragstart") has them. So without my patch the script can't determine startPos at all and so never does any real scrolling.