Fix bug in city-list autoscroll

TBR=esprehn

Review URL: https://codereview.chromium.org/759483003
This commit is contained in:
Rafael Weinstein 2014-11-24 18:27:49 -08:00
parent a0df465d10
commit 034e19300d

View File

@ -31,7 +31,7 @@ window.startLoad = new Date().getTime();
<city-list></city-list>
<script>
var cityList = document.querySelector('city-list');
var scrollBy = location.search.match(/auto=([0-9]+)/)[1];
var scrollBy = Number(location.search.match(/auto=([0-9]+)/)[1]);
function autoScroll() {
cityList.scrollBy(scrollBy);
@ -39,7 +39,6 @@ window.startLoad = new Date().getTime();
}
if (scrollBy) {
console.log('Autoscroll by ' + scrollBy);
setTimeout(function() {
requestAnimationFrame(autoScroll);
}, 200)