Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating Touch Compatibility with cycle #110

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

keeganbrown
Copy link

Hi malsup,

I've taken some initial strides with integrating touch compatibility into your jQuery Cycle plug-in. There's a lot of work to be done to update individual transitions to be touch friendly. For now, I've made versions of scrollHorz and scrollVert.

Please let me know what you think!

Thanks.

keeganbrown

Keegan Brown added 18 commits April 16, 2012 17:19
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Added iOS hardware acceleration back in. Had commented out for testing Android devices.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
…ation related changes.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
…xample2.html more.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
… iOS.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>

if (opts.touchClickDrag) {
$cont.unbind({
mousedown: dragStart,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dragStart, dragMove, and dragEnd are not global in scope and, therefore, unrecognized here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d'oh! pushed a quick fix up for now, might rework when I find time. Thanks for the feedback!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Great work on this, by the way. I've been playing with it and am
really impressed. FYI, I declared those three variables outside all
functions, and that's also been working great. Have you done much testing
with multitouch capable devices? It does not play nicely with more than one
finger touch events.

On Tue, Jun 19, 2012 at 12:43 PM, Keegan Brown <
reply@reply.github.com

wrote:

  •         mouseover: touchPause,
    
  •         mouseout: touchUnpause
    
  • });
    
  • //TOUCHMOD -- PREVENT TRANSITIONS IF USER IS HOVERING OVER CYCLE +
    
    opts.touchClickDrag == true
  • $cont.bind({
    
  •         mouseover: touchPause,
    
  •         mouseout: touchUnpause
    
  • });
    
    +}
    +function destroyTouch (cont, opts) {
  • var $cont = $(cont);
    
  • $cont.unbind('touchstart touchmove touchend touchcancel');
    
  • if (opts.touchClickDrag) {
    
  •         $cont.unbind({
    
  •                 mousedown: dragStart,
    

d'oh! pushed a quick fix up for now, might rework when I find time.


Reply to this email directly or view it on GitHub:
https://github.com/malsup/cycle/pull/110/files#r1011630

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you like it! It's a little rough around the edges (as you can tell), and if I found time, I might clean things up a bit. Didn't really put any effort in to multitouch. Right now it only cares about the first finger you touch the screen with. Are you seeing other errors related to multitouch rather than just support or lack thereof?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any need for multitouch support. What you've got working is really clean and smooth - exactly the functionality I'd expect from this. What I'm seeing is errors surrounding multitouch. I noticed it bugging out a little bit occasionally, and eventually realized that it was when I was accidentally touching with two fingers, or if I put a second finger down while I was still interacting with the first. I might play around with that piece if I have time. I'll let you know if I come up with a solution.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, how do I download this? I want to play around with it too please!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fork with touch compatibility lives here: https://github.com/keeganbrown/cycle. Work in progress (as if anything is ever finished...) so use in production at your own risk.

Keegan Brown added 11 commits June 19, 2012 12:41
…adequate solution for most implementations, unless there are externally placed mousedown, mousemove, or mouseup events on the cycle container itself. There's definitely a better solution, but right now this is the easy way. Thanks to gradynoonen for the catch.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
… with the idea to improve android.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Also fixed seamless sliding of 2 slides.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
…tion.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Keegan Brown and others added 9 commits July 24, 2012 16:49
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
…ice.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
…t to use the hardware acceleration trick for ios in android. it makes things bad.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
…ded fix back in to allow scrolling and full width cycles. This should eliminate Issue #2 -- #2

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
… bleh.

Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Signed-off-by: Keegan Brown <brownkg@peteramayer.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants