Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: sky/examples/city-list/index.sky

Issue 759483003: Fix bug in city-list autoscroll (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/city-list/index.sky
diff --git a/sky/examples/city-list/index.sky b/sky/examples/city-list/index.sky
index 45cfe145ee446c5e0bf91538133b305f8d00e3c8..41de93817ca58a605754235ead7abf1c2519f1e1 100644
--- a/sky/examples/city-list/index.sky
+++ b/sky/examples/city-list/index.sky
@@ -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]);
esprehn 2014/11/25 07:50:21 match returns null if it doesn't match anything, t
rafaelw 2014/11/28 04:22:48 Woops. Good catch. Fixed: https://codereview.chrom
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698