Skip to content

Commit

Permalink
Rounding for values in initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
acetous committed Jun 24, 2011
1 parent d8ee87c commit 7efe14a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/plax.js
Expand Up @@ -53,11 +53,11 @@
layer.startY = this.offsetTop

if(layer.invert == false){
layer.startX -= layer.xRange/2
layer.startY -= layer.yRange/2
layer.startX -= Math.floor(layer.xRange/2)
layer.startY -= Math.floor(layer.yRange/2)
} else {
layer.startX += layer.xRange/2
layer.startY += layer.yRange/2
layer.startX += Math.floor(layer.xRange/2)
layer.startY += Math.floor(layer.yRange/2)
}
layers.push(layer)
})
Expand Down

0 comments on commit 7efe14a

Please sign in to comment.