Permalink
Browse files

Maps should be pixel-perfect when stopped

  • Loading branch information...
1 parent 96da436 commit 18d251de34dda074b2783f2e06f4ca3de079acda @tmcw tmcw committed Feb 22, 2012
Showing with 5 additions and 5 deletions.
  1. +2 −2 modestmaps.js
  2. +1 −1 modestmaps.min.js
  3. +2 −2 src/layer.js
View
@@ -2042,8 +2042,8 @@ var MM = com.modestmaps = {
if (MM.transformProperty && MM._browser.webkit3d) {
// position tiles
MM.moveElement(level, {
- x: center.x - (theCoord.column * 256),
- y: center.y - (theCoord.row * 256),
+ x: this.map.fastForward ? (center.x - (theCoord.column * 256)) : Math.round(center.x - (theCoord.column * 256)),
+ y: this.map.fastForward ? (center.y - (theCoord.row * 256)) : Math.round(center.y - (theCoord.row * 256)),
scale: scale,
width: squareSize,
height: squareSize
View
Oops, something went wrong.
View
@@ -308,8 +308,8 @@
if (MM.transformProperty && MM._browser.webkit3d) {
// position tiles
MM.moveElement(level, {
- x: center.x - (theCoord.column * 256),
- y: center.y - (theCoord.row * 256),
+ x: this.map.fastForward ? (center.x - (theCoord.column * 256)) : Math.round(center.x - (theCoord.column * 256)),
+ y: this.map.fastForward ? (center.y - (theCoord.row * 256)) : Math.round(center.y - (theCoord.row * 256)),
scale: scale,
width: squareSize,
height: squareSize

0 comments on commit 18d251d

Please sign in to comment.