[OpenLayers-Dev] Patch to Panel.js
Matthew Michels
mattm at tuscanyda.com
Fri Oct 15 14:59:46 EDT 2010
I haven't gotten around to subscribing to the Trac system yet for OpenLayers.
Will try to do that soon.
We found what appears to be a bug in Panel.js, namely that 'children' appears
to not exist on older (3.0 and earlier) versions of Firefox. I believe that
'childNodes' is the correct W3C member.
We made this change to fix the problem:
--- OpenLayers-2.10/lib/OpenLayers/Control/Panel.js 2010-10-12 00:18:35 UTC (rev 15870)
+++ OpenLayers-2.10/lib/OpenLayers/Control/Panel.js 2010-10-12 01:53:25 UTC (rev 15871)
@@ -165,9 +165,9 @@
* Method: redraw
*/
redraw: function() {
- if (this.div.children.length>0) {
- for (var l=this.div.children.length, i=l-1 ; i>=0 ; i--) {
- this.div.removeChild(this.div.children[i]);
+ if (this.div.childNodes.length>0) {
+ for (var l=this.div.childNodes.length, i=l-1 ; i>=0 ; i--) {
+ this.div.removeChild(this.div.childNodes[i]);
}
}
this.div.innerHTML = "";
We wanted to report this in case this could be of help to others.
Thanks,
Matthew
More information about the Dev
mailing list