Giter VIP home page Giter VIP logo

snapscroller's Introduction

SnapScroller

SnapScroller - an Enyo 2.0 kind to Snap to scrolling positions

A simple scroller that 'snaps' to the position of its controls. You can manually snapTo a specific control index to provide external control of the scroll position for a carousel-like effect. If you correctly size your components you can also define a 'peek' value to show a portion of the previous and next elements rather than snapping all the way to the item position - allowing a clip of the next/prev items if creating a carousel-like component. Specify the "horizontal" and "vertical" properties of a normal Scroller to define if it should snap vertically or horizontally.

This component does not handle all the cases of the Enyo 1.0 SnapScroller control. It is intended for one main item in view at a time - may require additional work to correctly handle some other cases - comments and pull requests welcome!

See a variety of examples in "samples" directory.

NOTES:

  • on Android 4.1+ sometimes there is 'wobble' when snapping into position
  • overscroll on first/last can get sometimes 'stuck'
  • you can sometimes get stuck 'between' controls

website sample : http://www.ryanwatkins.net/software/snapscroller

Tested platforms include: Android 2+, Chrome 17+, Safari 5.1+, Firefox 10+

Copyright © 2012-2013 Ryan Watkins [email protected]

Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

snapscroller's People

Contributors

ryanwatkins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.