Use invoke to make this code smaller.

This commit is contained in:
danzel 2012-11-20 09:36:23 +13:00
parent b28b6da924
commit 63ad64cb7a

View File

@ -84,13 +84,8 @@ L.LayerGroup = L.Class.extend({
}
},
setZIndex: function(zIndex)
{
this.eachLayer(function(l) {
if (l.setZIndex) {
l.setZIndex(zIndex);
}
}, this);
setZIndex: function(zIndex) {
return this.invoke('setZIndex', zIndex);
}
});