joehewitt / scrollability

Imitates iOS native scrolling in JavaScript.
http://joehewitt.github.com/scrollability
Other
1.78k stars 146 forks source link

Missing scrollbar at init #1

Closed ptz0n closed 13 years ago

ptz0n commented 13 years ago

If you use UITableView as referance I'm missing the initial visibility of the scrollbar for orientation and context purpose. The user want to know how long (how many cells) and where in the TableView the user is located.

jakemarsh commented 13 years ago

This might be cleanly solved by implementing a version of UITableView's flashScrollIndicators method.

Something like:

function flashScrollIndicator() {
    if(scrollbar) {
        scrollbar.style.opacity = '0.8';
        scrollbar.style.webkitTransition = 'opacity 0.2s linear';

        setTimeout(function() {
            scrollbar.style.opacity = '0';
            scrollbar.style.webkitTransition = 'opacity 0.2s linear';
        }, 450);
    }
}
ptz0n commented 13 years ago

Right on point.

joehewitt commented 13 years ago

Fixed.