using blank image to avoid the "Loading Image" frames on Firefox that were discussed during the review (see #3419)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12243 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -39,7 +39,16 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile.BackBufferable, {
|
|||||||
*/
|
*/
|
||||||
frame: null,
|
frame: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Property: blankImageUrl
|
||||||
|
* {String} Does not result in a blank image on all browsers, but this is
|
||||||
|
* only required in some browsers as transparent backgroundImage, or as
|
||||||
|
* temporary image src while the tile is invisible and loading, so we don't
|
||||||
|
* care.
|
||||||
|
*/
|
||||||
|
blankImageUrl: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAQAIBRAA7",
|
||||||
|
|
||||||
|
/**
|
||||||
* Property: imageReloadAttempts
|
* Property: imageReloadAttempts
|
||||||
* {Integer} Attempts to load the image.
|
* {Integer} Attempts to load the image.
|
||||||
*/
|
*/
|
||||||
@@ -274,10 +283,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile.BackBufferable, {
|
|||||||
* url - {String} or undefined to hide the image
|
* url - {String} or undefined to hide the image
|
||||||
*/
|
*/
|
||||||
setImgSrc: function(url) {
|
setImgSrc: function(url) {
|
||||||
this.imgDiv.style.display = "none";
|
var img = this.imgDiv;
|
||||||
if (url) {
|
img.style.display = "none";
|
||||||
this.imgDiv.src = url;
|
img.src = url ? url : this.blankImageUrl;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -342,4 +350,4 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile.BackBufferable, {
|
|||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Tile.Image"
|
CLASS_NAME: "OpenLayers.Tile.Image"
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,15 +28,7 @@ OpenLayers.Tile.Image.IFrame = {
|
|||||||
*/
|
*/
|
||||||
useIFrame: null,
|
useIFrame: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property: blankImageUrl
|
|
||||||
* {String} This is only used as background image for the eventPane, so we
|
|
||||||
* don't care that this doesn't actually result in a blank image on all
|
|
||||||
* browsers
|
|
||||||
*/
|
|
||||||
blankImageUrl: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAQAIBRAA7",
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: updateBackBuffer
|
* Method: updateBackBuffer
|
||||||
* Update the <backBufferData>, and return a new or reposition the
|
* Update the <backBufferData>, and return a new or reposition the
|
||||||
* backBuffer. When a backbuffer is returned, the tile's markup is not
|
* backBuffer. When a backbuffer is returned, the tile's markup is not
|
||||||
@@ -193,4 +185,4 @@ OpenLayers.Tile.Image.IFrame = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user