Fix formatting

This commit is contained in:
Florian Bischof
2023-12-28 12:38:21 +01:00
parent a3ea289eb8
commit 18c0657292
2 changed files with 7 additions and 7 deletions

View File

@ -512,14 +512,14 @@ describe('TileLayer', () => {
});
});
describe('#getTileUrl', function () {
it('can call with static coords', function () {
describe('#getTileUrl', () => {
it('can call with static coords', () => {
// Layer is not added to the map
var layer = L.tileLayer('http://example.com/{z}/{x}/{y}.png');
var url = layer.getTileUrl({z: 1, x: 2, y: 3});
const layer = new TileLayer('http://example.com/{z}/{x}/{y}.png');
let url = layer.getTileUrl({z: 1, x: 2, y: 3});
expect(url).to.equal('http://example.com/1/2/3.png');
layer.addTo(map)
var url = layer.getTileUrl({z: 1, x: 2, y: 3});
layer.addTo(map);
url = layer.getTileUrl({z: 1, x: 2, y: 3});
expect(url).to.equal('http://example.com/1/2/3.png');
});
});

View File

@ -210,7 +210,7 @@ export const TileLayer = GridLayer.extend({
e.tile.onload = null;
},
_getZoomForUrl: function (zoom) {
_getZoomForUrl(zoom) {
const maxZoom = this.options.maxZoom,
zoomReverse = this.options.zoomReverse,
zoomOffset = this.options.zoomOffset;