"Event object conflict: If you include OpenLayers.js AFTER including

prototype.js, this effectively replaces most of prototype's Event object with
the OpenLayers.Event object, which has undesirable results (i.e. calling
Event.observe is actually calling OpenLayers.Event.observe)." Fixed by
only creating Event is Event does not already exist. (Closes #880)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4040 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-08-25 07:39:28 +00:00
parent d418b7f8da
commit b9a1287a5f

View File

@@ -324,9 +324,9 @@ OpenLayers.Event = {
/* prevent memory leaks in IE */
OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false);
if (window.Event) {
OpenLayers.Util.extend(window.Event, OpenLayers.Event);
} else {
// FIXME: Remove this in 3.0. In 3.0, Event.stop will no longer be provided
// by OpenLayers.
if (!window.Event) {
var Event = OpenLayers.Event;
}