Merge pull request #1122 from jacobtoye/LayerGroupEvents
Added 'layeradd' and 'layerremove' events to LayerGroup.
This commit is contained in:
commit
85ed21539f
@ -24,6 +24,8 @@ L.LayerGroup = L.Class.extend({
|
||||
this._map.addLayer(layer);
|
||||
}
|
||||
|
||||
this.fire('layeradd', { layer: layer });
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
@ -36,6 +38,8 @@ L.LayerGroup = L.Class.extend({
|
||||
this._map.removeLayer(layer);
|
||||
}
|
||||
|
||||
this.fire('layerremove', { layer: layer });
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user