OpenLayers OpenLayers

Changeset 6832

Show
Ignore:
Timestamp:
04/09/08 12:06:23 (5 months ago)
Author:
crschmidt
Message:

2.6 introduced a regression that maps could not be created when the Object
prototype is extended. Although OpenLayers is not designed to work when this
fundamental violation of Javascript is in place, we can at least not fail
so miserably in this case: this gets us back to a similar level of
functionality as we had in 2.5. This was brought up by a user working on
a viamichelin layer, which apparently extends the object prototype (bad!),
and fixed in conjuction with tschaub. r=pgiraud,tschaub (Pullup #1502)

Files:

Legend:

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

    r6435 r6832  
    533533    register: function (type, obj, func) { 
    534534 
    535         if (func != null) { 
     535        if (func != null &&  
     536            ((this.eventTypes && OpenLayers.Util.indexOf(this.eventTypes, type) != -1) || 
     537            OpenLayers.Util.indexOf(this.BROWSER_EVENTS, type) != -1)) { 
    536538            if (obj == null)  { 
    537539                obj = this.object; 
  • trunk/openlayers/tests/list-tests.html

    r6818 r6832  
    11<ul id="testlist"> 
    22    <li>OpenLayers.html</li> 
     3    <li>Extras.html</li> 
    34    <li>Ajax.html</li> 
    45    <li>BaseTypes.html</li>