Skip to content

Commit

Permalink
Minor cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Nov 5, 2015
1 parent 996289a commit 0b21506
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/template/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,8 @@
// Simple auto chunkSize throttling algorithm based on feedback loop:
// measure actual time between frames and scale chunk count by ratio
// of target/actual frame time
var lastChunkTime = this._lastChunkTime;
var currChunkTime = performance.now();
var ratio = this._targetFrameTime / (currChunkTime - lastChunkTime);
var ratio = this._targetFrameTime / (currChunkTime - this._lastChunkTime);
this._chunkCount = Math.round(this._chunkCount * ratio) || 1;
this._limit += this._chunkCount;
this._lastChunkTime = currChunkTime;
Expand Down Expand Up @@ -668,7 +667,7 @@
} else {
inst = this._stampInstance(idx, key);
}
var beforeRow = this._instances[idx + 1 ];
var beforeRow = this._instances[idx + 1];
var beforeNode = beforeRow && !beforeRow.isPlaceholder ? beforeRow._children[0] : this;
var parentNode = Polymer.dom(this).parentNode;
Polymer.dom(parentNode).insertBefore(inst.root, beforeNode);
Expand Down

0 comments on commit 0b21506

Please sign in to comment.