Fix bounds mode handling.

This commit is contained in:
David Molineus
2015-01-27 11:43:19 +01:00
parent a399004988
commit 9e0fe6a0b6
5 changed files with 8 additions and 6 deletions

View File

@@ -29,6 +29,8 @@ L.Map.include({
this.eachLayer(this._scanForBounds, this);
}
console.log(this._dynamicBounds);
if (this._dynamicBounds) {
this.fitBounds(this._dynamicBounds);
}
@@ -75,7 +77,7 @@ L.Map.include({
}
}
} else if ((!layer.options || (layer.options
&& layer.options.boundsMode && layer.options.boundsMode == 'extend')) && layer.eachLayer) {
&& layer.options.boundsMode && !layer.options.ignoreForBounds)) && layer.eachLayer) {
layer.eachLayer(this._scanForBounds, this);
}
}