On Wednesday, March 14, 2012, Tim-Hinnerk Heuer <[email protected]> wrote:
> Hi Eric,
> I couldn't reproduce the problem in any simple example. However, I did
fix it within OpenLayers. Basically, I changed a couple of lines:
>     /**
>      * Method: removeBackBuffer
>      * Remove back buffer from DOM.
>      */
>     removeBackBuffer: function() {
>         if(this.backBuffer) {
>             if (this.div.hasChildNodes(this.backBuffer)) { // ADDED THIS
LINE
>                 this.div.removeChild(this.backBuffer);
>             } // AND OF COURSE THIS
>             this.backBuffer = null;
>             this.backBufferResolution = null;
>             if(this.backBufferTimerId !== null) {
>                 window.clearTimeout(this.backBufferTimerId);
>                 this.backBufferTimerId = null;
>             }
>         }
>     },
> It's in my public repo. Should I make a pull request? I know it's yet
another check and might slow down things, but stability seems more
important. What do you think?


I'm sure this fixes it. The thing is I really don't understand how
this.backBuffer can be both non-null and not a child of this.div. I think
this should never occur. It may occur there's some code that empties the
layer div without calling removeBackBuffer beforehands, but the lib does
not have such code as far as I know.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to