diff --git a/examples/example.html b/examples/example.html index c02be0f..0b83c83 100644 --- a/examples/example.html +++ b/examples/example.html @@ -1,9 +1,9 @@ - + - + diff --git a/examples/iiif-example.js b/examples/iiif-example.js index c103b44..46fd7cd 100644 --- a/examples/iiif-example.js +++ b/examples/iiif-example.js @@ -8,7 +8,7 @@ map = L.map('map', { stanfordMlk = L.tileLayer.iiif('https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/info.json', { attribution: 'Martin Luther King Jr. & Joan Baez march to integrate schools, Grenada, MS, 1966', - maxZoom: 6 + maxZoom: 5 }).addTo(map); princetonMap = L.tileLayer.iiif('http://libimages.princeton.edu/loris2/pudl0076%2Fmap_pownall%2F00000001.jp2/info.json', { diff --git a/examples/manifest.html b/examples/manifest.html index 67aa31b..cfe244d 100644 --- a/examples/manifest.html +++ b/examples/manifest.html @@ -1,9 +1,9 @@ - + - + diff --git a/leaflet-iiif.js b/leaflet-iiif.js index 8f589eb..348adb6 100644 --- a/leaflet-iiif.js +++ b/leaflet-iiif.js @@ -35,7 +35,7 @@ L.TileLayer.Iiif = L.TileLayer.extend({ var _this = this, x = coords.x, y = (coords.y), - zoom = _this._map.getZoom(), + zoom = _this._getZoomForUrl(), scale = Math.pow(2, _this.maxNativeZoom - zoom), tileBaseSize = _this.options.tileSize * scale, minx = (x * tileBaseSize), @@ -193,9 +193,9 @@ L.TileLayer.Iiif = L.TileLayer.extend({ _templateUrl: function() { return this._infoToBaseUrl() + '{region}/{size}/{rotation}/{quality}.{format}'; }, - _tileShouldBeLoaded: function(coords) { + _isValidTile: function(coords) { var _this = this, - zoom = _this._map.getZoom(), + zoom = _this._getZoomForUrl(), sizes = _this._tierSizes[zoom], x = coords.x, y = (coords.y); diff --git a/package.json b/package.json index 7dcaf88..c53e7b9 100644 --- a/package.json +++ b/package.json @@ -28,12 +28,12 @@ "homepage": "https://github.com/mejackreed/Leaflet-IIIF", "devDependencies": { "http-server": "^0.9.0", - "jasmine": "^2.4.1", + "jasmine": "^2.5", "jquery": "^2.2.2", - "karma": "^0.13.22", - "karma-jasmine": "^0.3.7", + "karma": "^1.3", + "karma-jasmine": "^1.0", "karma-phantomjs-launcher": "^1.0.0", - "leaflet": "^0.7.7", + "leaflet": "^1.0", "phantomjs-prebuilt": "^2.1.5" } } diff --git a/spec/LTileLayerIiifSpec.js b/spec/LTileLayerIiifSpec.js index adfd44c..7e54f13 100644 --- a/spec/LTileLayerIiifSpec.js +++ b/spec/LTileLayerIiifSpec.js @@ -67,6 +67,10 @@ describe('L.TileLayer.Iiif', function() { iiifLayer = iiifLayerFactory(); }); + afterEach(function() { + iiifLayer.off('load'); + }); + it('by default is on', function(done) { map.addLayer(iiifLayer); iiifLayer.on('load', function() { @@ -91,6 +95,10 @@ describe('L.TileLayer.Iiif', function() { describe('quality', function() { var iiifLayer; + + afterEach(function() { + iiifLayer.off('load'); + }); it('by default is on', function(done) { iiifLayer = L.tileLayer.iiif('http://localhost:9876/base/fixtures/acrobat_info.json');