[OpenLayers-Dev] playing nicely with prototype Event

Erik Uzureau erik.uzureau at metacarta.com
Thu Jul 26 15:27:09 EDT 2007


ooooo.... this is a good find, paul.

I'm going to investigate this.
Erik

On 7/26/07, Paul Spencer <pspencer at dmsolutions.ca> wrote:
> 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/ |
> +-----------------------------------------------------------------+
>
>
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



More information about the Dev mailing list