Skip to content

Commit

Permalink
Merge pull request #78 from abrin/remove-jquery
Browse files Browse the repository at this point in the history
add catch statements
  • Loading branch information
mejackreed authored Nov 11, 2019
2 parents db87d74 + 9d907d5 commit 426e252
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions leaflet-iiif.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ L.TileLayer.Iiif = L.TileLayer.extend({
tile.tile.style.height = height + 'px';

});
})
.catch(function(err){
console.error(err);
});
},
onRemove: function(map) {
Expand Down Expand Up @@ -163,6 +166,9 @@ L.TileLayer.Iiif = L.TileLayer.extend({
.then(function(response) {
return response.json();
})
.catch(function(err){
console.error(err);
})
.then(function(data) {
_this.y = data.height;
_this.x = data.width;
Expand Down Expand Up @@ -226,7 +232,11 @@ L.TileLayer.Iiif = L.TileLayer.extend({

_this._tierSizes = tierSizes;
_this._imageSizes = imageSizes;
})
.catch(function(err){
console.error(err);
});

},

_setQuality: function() {
Expand Down

0 comments on commit 426e252

Please sign in to comment.