[OpenLayers-Dev] playing nicely with prototype Event
Paul Spencer
pspencer at dmsolutions.ca
Thu Jul 26 15:15:19 EDT 2007
Hey devs,
something else just came up. As part of removing prototype.js
dependency, it appears that you have kept most of Prototype's event
handling code, including the following (lines 327-331 of Events.js):
if (window.Event) {
OpenLayers.Util.extend(window.Event, OpenLayers.Event);
} else {
var Event = OpenLayers.Event;
}
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)
Is there a particular reason why we are putting OpenLayers.Event into
the global namespace?
Paul
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Chief Technology Officer |
|DM Solutions Group Inc http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+
More information about the Dev
mailing list