OpenLayers OpenLayers

Changeset 2861

Show
Ignore:
Timestamp:
03/22/07 16:39:16 (2 years ago)
Author:
sderle
Message:

Workaround for a bug in IE where toString() can't be assigned to an object in Util.extend()?? Strange but true. Fixes #552, wherein Geometry.Point tests fail. Tests now pass in IE.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/BaseTypes.js

    r2860 r2861  
    2424            } 
    2525            OpenLayers.Util.extend(proto, arguments[i]); 
     26 
     27            // This is a hack for IE see 
     28            // http://trac.openlayers.org/attachment/ticket/552 
     29            //  
     30            // The problem is that ie doesnt recognize toString as a property 
     31            //  so the util.extend() doesnt copy it over. we do it manually. 
     32            //  
     33            // to be revisited in 3.0 
     34            //  
     35            if (arguments[i].toString) { 
     36                proto.toString = arguments[i].toString; 
     37            } 
    2638        } 
    2739        return proto;