trigger an event when the layer's opacity change. r=elemoine (closes #2112)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9616 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2009-08-10 06:10:29 +00:00
parent c1a0d405e4
commit 2b9bd25530
3 changed files with 41 additions and 6 deletions

View File

@@ -1109,6 +1109,12 @@ OpenLayers.Layer = OpenLayers.Class({
OpenLayers.Util.modifyDOMElement(element, null, null, null,
null, null, null, opacity);
}
if (this.map != null) {
this.map.events.triggerEvent("changelayer", {
layer: this,
property: "opacity"
});
}
}
},