[OpenLayers-Commits] r11453 - sandbox/ahocevar/layercontainer/lib/OpenLayers

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Feb 24 19:47:14 EST 2011


Author: ahocevar
Date: 2011-02-24 16:47:14 -0800 (Thu, 24 Feb 2011)
New Revision: 11453

Modified:
   sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js
Log:
round delta, to make sure that what we track for minPx and maxPx is the same delta we apply to layerContainerDiv.style.left/top

Modified: sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js
===================================================================
--- sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js	2011-02-25 00:20:25 UTC (rev 11452)
+++ sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js	2011-02-25 00:47:14 UTC (rev 11453)
@@ -1660,6 +1660,8 @@
      * dy - {Number}
      */
     moveByPx: function(dx, dy) {
+        dx = Math.round(dx);
+        dy = Math.round(dy);
         var x = this.size.w / 2 + dx;
         var y = this.size.h / 2 + dy;
         var valid = x <= this.maxPx.x &&



More information about the Commits mailing list