fix old IE and stricter jshinting

This commit is contained in:
Vladimir Agafonkin 2013-12-13 17:24:43 -05:00
parent 69890a29cf
commit 773fa91d1e
2 changed files with 9 additions and 8 deletions

View File

@ -7,6 +7,7 @@
"define": true "define": true
}, },
"strict": false, "strict": false,
"es3": true,
// code style // code style
"bitwise": true, "bitwise": true,

View File

@ -10,7 +10,7 @@ L.TileLayer = L.GridLayer.extend({
subdomains: 'abc', subdomains: 'abc',
// errorTileUrl: '', // errorTileUrl: '',
zoomOffset: 0, zoomOffset: 0
/* /*
maxNativeZoom: <Number>, maxNativeZoom: <Number>,
@ -53,8 +53,8 @@ L.TileLayer = L.GridLayer.extend({
createTile: function (coords, done) { createTile: function (coords, done) {
var tile = document.createElement('img'); var tile = document.createElement('img');
tile.onload = L.bind(this._tileOnLoad, this, done); tile.onload = L.bind(this._tileOnLoad, this, done, tile);
tile.onerror = L.bind(this._tileOnError, this, done); tile.onerror = L.bind(this._tileOnError, this, done, tile);
tile.src = this.getTileUrl(coords); tile.src = this.getTileUrl(coords);
@ -70,16 +70,16 @@ L.TileLayer = L.GridLayer.extend({
}, this.options)); }, this.options));
}, },
_tileOnLoad: function (done, e) { _tileOnLoad: function (done, tile, e) {
done(null, e.target); done(null, tile);
}, },
_tileOnError: function (done, e) { _tileOnError: function (done, tile, e) {
var errorUrl = this.options.errorTileUrl; var errorUrl = this.options.errorTileUrl;
if (errorUrl) { if (errorUrl) {
e.target.src = errorUrl; tile.src = errorUrl;
} }
done(e, e.target); done(e, tile);
}, },
_getTileSize: function () { _getTileSize: function () {