[OpenLayers-Commits] r12286 - trunk/openlayers/lib/OpenLayers/Tile

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Tue Aug 30 14:37:14 EDT 2011


Author: ahocevar
Date: 2011-08-30 11:37:11 -0700 (Tue, 30 Aug 2011)
New Revision: 12286

Modified:
   trunk/openlayers/lib/OpenLayers/Tile/Image.js
Log:
unregister load and error handlers after blank image is loaded. r=sbrunner,pgiraud (closes #3419)

Modified: trunk/openlayers/lib/OpenLayers/Tile/Image.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Tile/Image.js	2011-08-30 11:50:42 UTC (rev 12285)
+++ trunk/openlayers/lib/OpenLayers/Tile/Image.js	2011-08-30 18:37:11 UTC (rev 12286)
@@ -328,7 +328,6 @@
      */
     createBackBuffer: function() {
         var frame = this.frame.cloneNode(false);
-        OpenLayers.Event.stopObservingElement(this.imgDiv);
         frame.appendChild(this.imgDiv);
         this.imgDiv = null;
         return frame;
@@ -340,6 +339,7 @@
      */
     onImageLoad: function() {
         var img = this.imgDiv;
+        OpenLayers.Event.stopObservingElement(img);
         img.style.display = "";
         this.isLoading = false;
         this.events.triggerEvent("loadend");



More information about the Commits mailing list