Use invoke to make this code smaller.
This commit is contained in:
parent
b28b6da924
commit
63ad64cb7a
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user