Change Layer.EventPane to override Layer.display() rather than Layer.setVisibility(). Also, add setZIndex() there to update the pane's z-index when the div's changes.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1613 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-10-05 20:45:12 +00:00
parent bf075e63e0
commit 7a1d3601a1
+8 -5
View File
@@ -66,14 +66,17 @@ OpenLayers.Layer.EventPane.prototype =
}, },
/** /**
* @param {Boolean} visible * @param {Boolean} display
* @param {Boolean} noEvent
*/ */
setVisibility: function(visible, noEvent) { display: function(display) {
OpenLayers.Layer.prototype.setVisibility.apply(this, arguments); OpenLayers.Layer.prototype.display.apply(this, arguments);
this.pane.style.display = this.div.style.display; this.pane.style.display = this.div.style.display;
}, },
setZIndex: function (zIdx) {
OpenLayers.Layer.prototype.setZIndex.apply(this, arguments);
this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
},
/** @final @type String */ /** @final @type String */
CLASS_NAME: "OpenLayers.Layer.EventPane" CLASS_NAME: "OpenLayers.Layer.EventPane"