Skip to content

Commit

Permalink
Floor transform values
Browse files Browse the repository at this point in the history
  • Loading branch information
ojanvafai committed Mar 6, 2014
1 parent e639d3c commit 7323c5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrolling.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ ScrollingEngine.prototype.refresh_ = function(force) {
var firstPhysicalIndex = firstReifiedIndex % this.physicalCount_;
var baseVirtualIndex = firstReifiedIndex - firstPhysicalIndex;

var baseTransformValue = this.height_ * baseVirtualIndex;
var nextTransformValue = baseTransformValue + this.physicalHeight_;
var baseTransformValue = Math.floor(this.height_ * baseVirtualIndex);
var nextTransformValue = Math.floor(baseTransformValue + this.physicalHeight_);

var baseTransformString = 'translate3d(0,' + baseTransformValue + 'px,0)';
var nextTransformString = 'translate3d(0,' + nextTransformValue + 'px,0)';
Expand Down

0 comments on commit 7323c5c

Please sign in to comment.