chrisbateman / impetus

Agnostic utility for adding momentum to anything. It's like iScroll, except not for scrolling. Supports mouse and touch events.
chrisbateman.github.io/impetus
MIT License
487 stars 70 forks source link

Feat. request: Snap #17

Closed abusedmedia closed 8 years ago

abusedmedia commented 8 years ago

Hi there

It would be nice to have an option to define a snap value to force the position, upon release, to a specific snap-point. I've already tried to figure out the best way to integrate this behaviour into the lib, no smart ideas so far.

Zynga have an implementation that is far from perfect: http://zynga.github.io/scroller/demo/dom-snapping.html

and GreenSock has a very nice implementation (but not open source though): https://greensock.com/throwpropsplugin

cheers

abusedmedia commented 8 years ago

Closing as per already asked in #7