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

manual swipe like Facebokk app #43

Closed
Colir opened this issue Oct 30, 2012 · 4 comments
Closed

manual swipe like Facebokk app #43

Colir opened this issue Oct 30, 2012 · 4 comments

Comments

@Colir
Copy link

Colir commented Oct 30, 2012

Hi, is not really a issues, but more a "how to"
I looking for a way to reproduce the same behavior than the ios facebook app with the sidebar panel.
SwipLeft and swipeRight work well,
but when i'm trying to get a 'manual' swipe (i update my element position x according to distance), i can move my element on the right event if my swipe is on left.
i try to fix it by regarding if my distance go throw 0, but without success...

Here is my code example

swipeSize = is my max swipe size.
This work well on right swipe.

$content.swipe({
swipeStatus:function(event, phase, direction, distance, duration ) {

            if(distance <= swipeSize && direction=='right') $content.css(transform,'translate3d('+ distance  +'px,0,0)')
            if(distance != 0 && direction=='left') $content.css(transform,'translate3d('+ distance  +'px,0,0)')


        }

    });
@mattbryson
Copy link
Owner

Not too sure what you mean, but this example might help

http://labs.skinkers.com/content/touchSwipe/demo/11_Image_gallery_example.php

It has both draggin and swiping, which sounds like what your after.

m.

@Colir
Copy link
Author

Colir commented Nov 19, 2012

i've done what i would like as effect, i will show you soon. Your lib is really impressive.
thanks

@alexcroox
Copy link

Hey colir, did you manage to get the fb style aside sliding?

@Colir
Copy link
Author

Colir commented Feb 14, 2013

yes man.
Check http://www.cournon.com on 768px wide screen

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

No branches or pull requests

3 participants