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.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2861 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-03-22 20:39:16 +00:00
parent 27a423a5f8
commit c5406bbfeb

View File

@@ -23,6 +23,18 @@ OpenLayers.Class = {
arguments[i] = new mixin(OpenLayers.Class.isPrototype);
}
OpenLayers.Util.extend(proto, arguments[i]);
// This is a hack for IE see
// http://trac.openlayers.org/attachment/ticket/552
//
// The problem is that ie doesnt recognize toString as a property
// so the util.extend() doesnt copy it over. we do it manually.
//
// to be revisited in 3.0
//
if (arguments[i].toString) {
proto.toString = arguments[i].toString;
}
}
return proto;
}