Changeset 2218
- Timestamp:
- 02/09/07 17:35:21 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/emanuel/animatedZooming/lib/OpenLayers/Layer/Grid.js
r2214 r2218 39 39 zoomOutTile: null, 40 40 41 layerClone: null,42 41 43 42 … … 54 53 arguments); 55 54 this.grid = new Array(); 56 this.layerClone = new Array();57 55 }, 58 56 … … 209 207 var layerGrid = this.map.layers[i].grid; 210 208 211 this.layerClone[i] = this.map.layers[i].clone();212 209 // go through the whole grid of every layer 213 210 for (var iRow=0; iRow < layerGrid.length; iRow++) { … … 217 214 // if tile outside the viewport, set it 218 215 // invisible 219 if ( extent.containsBounds(tile.bounds,true, false)) {220 tile.imgDiv.style.display = " block";216 if (!extent.containsBounds(tile.bounds,true, false)) { 217 tile.imgDiv.style.display = "none"; 221 218 } 222 219 } … … 270 267 var tile = layerGrid[iRow][iCol]; 271 268 if (tile.imgDiv) { 272 if (tile.imgDiv.style.display == "block") {269 if (tile.imgDiv.style.display != "none") { 273 270 //define the factors for rows and columns 274 271 //(relates to the center tile) … … 389 386 this.zoomOutTile.imgDiv.style.left = centerPx.x + offsetx; 390 387 this.zoomOutTile.imgDiv.style.top = centerPx.y + offsety; 388 389 // set zoomOutTile visible if viewport < map bounds 390 if ( (bounds.left < extent.left) || (bounds.right > extent.right) ) 391 this.map.baseLayer.zoomOutTile.imgDiv.style.display = "block"; 392 else 393 this.map.baseLayer.zoomOutTile.imgDiv.style.display = "none"; 391 394 } 392 395 },
