Revert "Fixing the extend method to work on IE."
This reverts commit 71276b5323.
This commit is contained in:
@@ -91,7 +91,7 @@ OpenLayers.Util.extend = function(destination, source) {
|
|||||||
destination = destination || {};
|
destination = destination || {};
|
||||||
if (source) {
|
if (source) {
|
||||||
for (var property in source) {
|
for (var property in source) {
|
||||||
if (Object.prototype.hasOwnProperty.call(source, property)) {
|
if (source.hasOwnProperty(property)) {
|
||||||
var value = source[property];
|
var value = source[property];
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
destination[property] = value;
|
destination[property] = value;
|
||||||
|
|||||||
@@ -1120,34 +1120,10 @@
|
|||||||
t.eq(OpenLayers.Util.getFormattedLonLat(-181, "lon"), "179°00'00\"E", "crossing dateline from the west results in correct east coordinate");
|
t.eq(OpenLayers.Util.getFormattedLonLat(-181, "lon"), "179°00'00\"E", "crossing dateline from the west results in correct east coordinate");
|
||||||
t.eq(OpenLayers.Util.getFormattedLonLat(181, "lon"), "179°00'00\"W", "crossing dateline from the east results in correct west coordinate");
|
t.eq(OpenLayers.Util.getFormattedLonLat(181, "lon"), "179°00'00\"W", "crossing dateline from the east results in correct west coordinate");
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="map" style="width: 1024px; height: 512px;"/>
|
<div id="map" style="width: 1024px; height: 512px;"/>
|
||||||
<script>
|
|
||||||
/**
|
|
||||||
* To test that we can safely call OpenLayers.Util.extend with an Event
|
|
||||||
* instance, we need to capture a real event.
|
|
||||||
*/
|
|
||||||
var loadEvent;
|
|
||||||
window.onload = function(evt) {
|
|
||||||
loadEvent = evt || window.event;
|
|
||||||
}
|
|
||||||
function test_extend_event(t) {
|
|
||||||
t.plan(2);
|
|
||||||
t.ok(loadEvent, "loadEvent recorded");
|
|
||||||
var extended, err;
|
|
||||||
try {
|
|
||||||
extended = OpenLayers.Util.extend({foo: "bar"}, loadEvent);
|
|
||||||
} catch (e) {
|
|
||||||
err = e;
|
|
||||||
}
|
|
||||||
if (err) {
|
|
||||||
t.fail("Failed to extend event");
|
|
||||||
} else {
|
|
||||||
t.eq(extended && extended.foo, "bar", "extended with event");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user