Ticket #1018: drawn.2.patch
| File drawn.2.patch, 2.7 kB (added by euzuro, 1 year ago) |
|---|
-
lib/OpenLayers/Tile/Image.js
old new 123 123 OpenLayers.Util.modifyDOMElement(this.imgDiv, 124 124 null, null, imageSize) ; 125 125 } 126 this.drawn = true;127 126 return true; 128 127 }, 129 128 -
lib/OpenLayers/Tile.js
old new 72 72 */ 73 73 position: null, 74 74 75 /**76 * Property: drawn77 * {Boolean} false78 */79 drawn: false,80 81 75 /** 82 76 * Property: isLoading 83 77 * {Boolean} Is the tile loading? … … 144 138 var withinMaxExtent = (maxExtent && 145 139 this.bounds.intersectsBounds(maxExtent, false)); 146 140 147 var mapExtent = this.layer.map.getExtent(); 148 var withinMapExtent = (mapExtent && 149 this.bounds.intersectsBounds(mapExtent, false)); 150 151 // There are two cases where we *wouldn't* want to draw the tile: 152 // 153 // 1) If the tile is outside its layer's maxExtent 154 // 2) When the layer's buffer is 0, if the tile is outside the map's 155 // extent (out of view) 156 // 157 // ...what we return is the opposite of the above conditions :-) 158 // 159 return ( (withinMaxExtent || this.layer.displayOutsideMaxExtent) && 160 (withinMapExtent || (this.layer.buffer != 0)) ); 141 // The only case where we *wouldn't* want to draw the tile is if the 142 // tile is outside its layer's maxExtent. 143 return (withinMaxExtent || this.layer.displayOutsideMaxExtent); 161 144 }, 162 145 163 146 /** … … 175 158 redraw = true; 176 159 } 177 160 178 this.drawn = false;179 161 this.bounds = bounds.clone(); 180 162 this.position = position.clone(); 181 163 if (redraw) { -
lib/OpenLayers/Layer/Grid.js
old new 548 548 break; 549 549 } 550 550 }; 551 if (this.buffer == 0) {552 for (var r=0, rl=this.grid.length; r<rl; r++) {553 var row = this.grid[r];554 for (var c=0, cl=row.length; c<cl; c++) {555 var tile = row[c];556 if (!tile.drawn &&557 tile.bounds.intersectsBounds(bounds, false)) {558 tile.draw();559 }560 }561 }562 }563 551 }, 564 552 565 553 /**
