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:
@@ -23,6 +23,18 @@ OpenLayers.Class = {
|
|||||||
arguments[i] = new mixin(OpenLayers.Class.isPrototype);
|
arguments[i] = new mixin(OpenLayers.Class.isPrototype);
|
||||||
}
|
}
|
||||||
OpenLayers.Util.extend(proto, arguments[i]);
|
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;
|
return proto;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user