OpenLayers OpenLayers

Changeset 2863

Show
Ignore:
Timestamp:
03/22/07 17:06:29 (2 years ago)
Author:
euzuro
Message:

fix for #457 - allow specification of whether or not to let events fallthrough the map

Files:

Legend:

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

    r2858 r2863  
    128128    theme: null, 
    129129 
     130    /** Should OpenLayers allow events on the map to fall through to other 
     131     *   elements on the page, or should it swallow them? (#457) 
     132     *  
     133     *  Default is to swallow them. 
     134     *  
     135     * @type boolean  
     136     */ 
     137    fallThrough: false, 
     138 
    130139    /** 
    131140     * @constructor 
     
    135144     */     
    136145    initialize: function (div, options) { 
     146         
     147        //set the default options 
     148        this.setOptions(options); 
    137149 
    138150        this.div = div = OpenLayers.Util.getElement(div); 
     
    155167        this.viewPortDiv.appendChild(this.layerContainerDiv); 
    156168 
    157         this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES); 
     169        this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES, this.fallThrough); 
    158170 
    159171        this.updateSize(); 
     
    172184                          this.updateSize.bindAsEventListener(this)); 
    173185        } 
    174          
    175         //set the default options 
    176         this.setOptions(options); 
    177186         
    178187        // only append link stylesheet if the theme property is set