[OpenLayers-Commits] r12306 - sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Aug 31 14:42:27 EDT 2011


Author: erilem
Date: 2011-08-31 11:42:27 -0700 (Wed, 31 Aug 2011)
New Revision: 12306

Modified:
   sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js
Log:
always call transformDiv after retiling (when in "client zoom" mode)

Modified: sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js	2011-08-31 18:42:20 UTC (rev 12305)
+++ sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js	2011-08-31 18:42:27 UTC (rev 12306)
@@ -251,8 +251,9 @@
                 // We want to redraw whenever even the slightest part of the 
                 //  current bounds is not contained by our tile.
                 //  (thus, we do not specify partial -- its default is false)
-                if ( forceReTile || 
-                     (!dragging && !tilesBounds.containsBounds(bounds))) {
+                forceReTile = forceReTile ||
+                              (!dragging && !tilesBounds.containsBounds(bounds));
+                if(forceReTile) {
                     this.initSingleTile(bounds);
                 }
             } else {
@@ -261,16 +262,17 @@
                 //  *partially* contained by our tiles (IE user has 
                 //  programmatically panned to the other side of the earth) 
                 //  then we want to reTile (thus, partial true).  
-                //
-                if (forceReTile || !tilesBounds.containsBounds(bounds, true)) {
+
+                forceReTile = forceReTile || !tilesBounds.containsBounds(bounds, true);
+                if(forceReTile) {
                     this.initGriddedTiles(bounds);
                 } else {
                     this.scheduleMoveGriddedTiles();
                 }
             }
 
-            if (resolution !== serverSupportedResolution) {
-                if (forceReTile) {
+            if(resolution !== serverSupportedResolution) {
+                if(forceReTile) {
                     // stretch the layer div
                     this.transformDiv(serverSupportedResolution / resolution);
                 }



More information about the Commits mailing list