Minor cleanup.

This commit is contained in:
Kevin Schaaf 2015-11-04 19:54:06 -08:00
parent 996289a507
commit 0b21506ec2

View File

@ -315,9 +315,8 @@ Then the `observe` property should be configured as follows:
// 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;
@ -668,7 +667,7 @@ Then the `observe` property should be configured as follows:
} 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);