OpenLayers OpenLayers

Changeset 4040

Show
Ignore:
Timestamp:
08/25/07 03:39:28 (1 year ago)
Author:
crschmidt
Message:

"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)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Events.js

    r3984 r4040  
    325325OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false); 
    326326 
    327 if (window.Event) { 
    328   OpenLayers.Util.extend(window.Event, OpenLayers.Event); 
    329 } else
     327// FIXME: Remove this in 3.0. In 3.0, Event.stop will no longer be provided 
     328// by OpenLayers. 
     329if (!window.Event)
    330330  var Event = OpenLayers.Event; 
    331331}