Skip to content

Commit

Permalink
Remove autoscrolling; doesn't work well in table layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed May 23, 2017
1 parent e7d1d03 commit b79bda2
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions bench/benchmarks_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,6 @@ const BenchmarksView = React.createClass({
return output;
},

scrollToBenchmark: function(name, version) {
const duration = 300;
const startTime = (new Date()).getTime();
const startYOffset = window.pageYOffset;

requestAnimationFrame(function frame() {
const endYOffset = document.getElementById(name + version).offsetTop;
const time = (new Date()).getTime();
const yOffset = Math.min((time - startTime) / duration, 1) * (endYOffset - startYOffset) + startYOffset;
window.scrollTo(0, yOffset);
if (time < startTime + duration) requestAnimationFrame(frame);
});
},

getInitialState: function() {
const results = {};

Expand All @@ -129,7 +115,6 @@ const BenchmarksView = React.createClass({

asyncSeries(Object.keys(that.state.results), (name, callback) => {
asyncSeries(Object.keys(that.state.results[name]), (version, callback) => {
that.scrollToBenchmark(name, version);
that.runBenchmark(name, version, callback);
}, callback);
}, (err) => {
Expand All @@ -154,7 +139,6 @@ const BenchmarksView = React.createClass({
}

results.status = 'running';
this.scrollToBenchmark(name, version);
log('dark', 'starting');

setTimeout(() => {
Expand Down

0 comments on commit b79bda2

Please sign in to comment.