Check for null before setting the zindex, and instead keep it null initially. This way calls to setZIndex() wont fail if passed null.

This commit is contained in:
kerryarts 2014-11-21 17:11:10 +13:00
parent 756888cee7
commit ff10d00297

View File

@ -15,7 +15,7 @@ L.GridLayer = L.Layer.extend({
updateInterval: 200,
attribution: null,
zIndex: 'auto',
zIndex: null,
bounds: null,
minZoom: 0
@ -124,7 +124,7 @@ L.GridLayer = L.Layer.extend({
},
_updateZIndex: function () {
if (this._container && this.options.zIndex !== undefined) {
if (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {
this._container.style.zIndex = this.options.zIndex;
}
},