Merge pull request #1019 from ahocevar/chrome-optimized
Deal with recent Chrome optimizations to avoid failing TileManager and tests
This commit is contained in:
committed by
Bart van den Eijnden
parent
d020e8f666
commit
49dd5a4fd8
@@ -314,11 +314,17 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
||||
* Creates the content for the frame on the tile.
|
||||
*/
|
||||
initImage: function() {
|
||||
if (!this.url && !this.imgDiv) {
|
||||
// fast path out - if there is no tile url and no previous image
|
||||
this.isLoading = false;
|
||||
return;
|
||||
}
|
||||
this.events.triggerEvent('beforeload');
|
||||
this.layer.div.appendChild(this.getTile());
|
||||
this.events.triggerEvent(this._loadEvent);
|
||||
var img = this.getImage();
|
||||
if (this.url && OpenLayers.Util.isEquivalentUrl(img.src, this.url)) {
|
||||
var src = img.getAttribute('src') || '';
|
||||
if (this.url && OpenLayers.Util.isEquivalentUrl(src, this.url)) {
|
||||
this._loadTimeout = window.setTimeout(
|
||||
OpenLayers.Function.bind(this.onImageLoad, this), 0
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user