Skip to content


Flicking to configured 'lock points' #4

ahume opened this Issue · 3 comments

3 participants


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...


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


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.


@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
Something went wrong with that request. Please try again.