From 3d13e1f60d0115112a73d2d7314c0bae8d3e141d Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 9 Aug 2006 06:20:01 +0000 Subject: [PATCH] coding standards git-svn-id: http://svn.openlayers.org/trunk/openlayers@1152 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 80981a1b1a..1f8a174f9d 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -146,14 +146,16 @@ OpenLayers.Layer.Grid.prototype = this._initTiles(); } else { while (true) { - var topLeft = this.map.getViewPortPxFromLayerPx( this.grid[0][0].position ); - if (topLeft.x > -this.tileSize.w * (this.buffer - 1)) { + var tlLayer = this.grid[0][0].position; + var tlViewPort = + this.map.getViewPortPxFromLayerPx(tlLayer); + if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); - } else if (topLeft.x < -this.tileSize.w * this.buffer) { + } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); - } else if (topLeft.y > -this.tileSize.w * (this.buffer - 1)) { + } else if (tlViewPort.y > -this.tileSize.w * (this.buffer - 1)) { this.shiftRow(true); - } else if (topLeft.y < -this.tileSize.h * this.buffer) { + } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break;