Make sure we do not make abandoned tiles visible
This commit is contained in:
@@ -381,9 +381,13 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
|||||||
OpenLayers.Event.stopObservingElement(img);
|
OpenLayers.Event.stopObservingElement(img);
|
||||||
|
|
||||||
OpenLayers.Animation.requestFrame(OpenLayers.Function.bind(function() {
|
OpenLayers.Animation.requestFrame(OpenLayers.Function.bind(function() {
|
||||||
img.style.visibility = 'inherit';
|
// make sure we are not destroyed and not being reused for a
|
||||||
img.style.opacity = this.layer.opacity;
|
// different image
|
||||||
this.events.triggerEvent("loadend");
|
if (this.imgDiv === img) {
|
||||||
|
img.style.visibility = 'inherit';
|
||||||
|
img.style.opacity = this.layer.opacity;
|
||||||
|
this.events.triggerEvent("loadend");
|
||||||
|
}
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user