Tile.Image.cloneMarkup renamed Tile.Image.createBackBuffer

This commit is contained in:
Éric Lemoine
2011-10-29 12:22:08 +02:00
parent f3e0ac9425
commit c80746b890
5 changed files with 27 additions and 24 deletions

View File

@@ -320,21 +320,23 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
},
/**
* Method: cloneMarkup
* Clone this tile's markup.
* Method: createBackBuffer
* Create a backbuffer for this tile. A backbuffer isn't exactly a clone
* of the tile's markup, because we want to avoid the reloading of the
* image. So we clone the frame, and steal the image from the tile.
*
* Returns:
* {DOMElement} The markup, or undefined if the tile has no image
* or if it's currently loading.
*/
cloneMarkup: function() {
createBackBuffer: function() {
if(!this.imgDiv || this.isLoading) {
return;
}
var clone = this.frame.cloneNode(false);
clone.appendChild(this.imgDiv);
var backBuffer = this.frame.cloneNode(false);
backBuffer.appendChild(this.imgDiv);
this.imgDiv = null;
return clone;
return backBuffer;
},
/**