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

Flicking to configured 'lock points' #4

Open
ahume opened this issue May 3, 2010 · 3 comments
Open

Flicking to configured 'lock points' #4

ahume opened this issue May 3, 2010 · 3 comments

Comments

@ahume
Copy link

ahume commented May 3, 2010

A small idea for an enhancement.

Could be implemented by adding a new config parameter which defines in pixels the width or height of repeated 'stopping points' along the width or height of the scrollers content.

This would allow reproducing effects similar to what is seen in the native photo gallery apps in iPhone/iPad, where a flick is used to move the interface to the next or previous picture.

Eg, if I passed in {'stopping-width: 300'} then an initial flick to the right will take me 300px into the content (ie a x offset of -300px), a further flick 600px, etc...

@davidaurelio
Copy link
Owner

Sounds like a good idea – I might add this at a later time. I would like to get other things straight first.

@andybeeching
Copy link

If you expose a scrollTo method on TouchScroll instances that accepts an x,y screen co-ordinate (inferred from offsets), then users can define their own grid, and snapto at a point they define (normally TouchEnd, so the default 'flick' action would have to be cancelled.

@davidaurelio
Copy link
Owner

@jensarps and me hacked preliminary support for this into the stable version with fe9ec73.

Please try out the feature and report everything that doesn’t work here.
Currently it is only possible to flick to a 100% height/width grid. Add {snapToGrid: true} to TouchScroll instantiations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants