fix for #457 - allow specification of whether or not to let events fallthrough the map
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2863 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -127,6 +127,15 @@ OpenLayers.Map.prototype = {
|
||||
/** @type string */
|
||||
theme: null,
|
||||
|
||||
/** Should OpenLayers allow events on the map to fall through to other
|
||||
* elements on the page, or should it swallow them? (#457)
|
||||
*
|
||||
* Default is to swallow them.
|
||||
*
|
||||
* @type boolean
|
||||
*/
|
||||
fallThrough: false,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
@@ -134,6 +143,9 @@ OpenLayers.Map.prototype = {
|
||||
* @param {Object} options Hashtable of extra options to tag onto the map
|
||||
*/
|
||||
initialize: function (div, options) {
|
||||
|
||||
//set the default options
|
||||
this.setOptions(options);
|
||||
|
||||
this.div = div = OpenLayers.Util.getElement(div);
|
||||
|
||||
@@ -154,7 +166,7 @@ OpenLayers.Map.prototype = {
|
||||
|
||||
this.viewPortDiv.appendChild(this.layerContainerDiv);
|
||||
|
||||
this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES);
|
||||
this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES, this.fallThrough);
|
||||
|
||||
this.updateSize();
|
||||
|
||||
@@ -172,9 +184,6 @@ OpenLayers.Map.prototype = {
|
||||
this.updateSize.bindAsEventListener(this));
|
||||
}
|
||||
|
||||
//set the default options
|
||||
this.setOptions(options);
|
||||
|
||||
// only append link stylesheet if the theme property is set
|
||||
if(this.theme) {
|
||||
var cssNode = document.createElement('link');
|
||||
|
||||
Reference in New Issue
Block a user