| Index: sky/examples/city-list/index.sky
|
| diff --git a/sky/examples/city-list/index.sky b/sky/examples/city-list/index.sky
|
| index 26e51444f6de0e5d7b54a894b0f06804fdef4a36..45cfe145ee446c5e0bf91538133b305f8d00e3c8 100644
|
| --- a/sky/examples/city-list/index.sky
|
| +++ b/sky/examples/city-list/index.sky
|
| @@ -29,5 +29,21 @@ window.startLoad = new Date().getTime();
|
| </script>
|
| <body>
|
| <city-list></city-list>
|
| + <script>
|
| + var cityList = document.querySelector('city-list');
|
| + var scrollBy = location.search.match(/auto=([0-9]+)/)[1];
|
| +
|
| + function autoScroll() {
|
| + cityList.scrollBy(scrollBy);
|
| + requestAnimationFrame(autoScroll);
|
| + }
|
| +
|
| + if (scrollBy) {
|
| + console.log('Autoscroll by ' + scrollBy);
|
| + setTimeout(function() {
|
| + requestAnimationFrame(autoScroll);
|
| + }, 200)
|
| + }
|
| + </script>
|
| </body>
|
| </html>
|
|
|