Skip to content

Commit

Permalink
Merge pull request #18 from mejackreed/better-v-handling
Browse files Browse the repository at this point in the history
better interpretation of IIIF api versions
  • Loading branch information
mejackreed committed Jul 19, 2015
2 parents 946e704 + 6835010 commit 87671e7
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions leaflet-iiif.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,11 @@ L.TileLayer.Iiif = L.TileLayer.extend({
}else {
profile = data.profile;
}
switch (profile) {
case 'http://library.stanford.edu/iiif/image-api/compliance.html#level1':
_this.quality = 100;
break;
case 'http://library.stanford.edu/iiif/image-api/1.1/compliance.html':
_this.quality = 'native';
break;
case 'http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1':
switch (true) {
case /^http:\/\/library.stanford.edu\/iiif\/image-api\/1.1\/compliance.html.*$/.test(profile):
_this.quality = 'native';
break;
case 'http://iiif.io/api/image/2/level2.json':
_this.quality = 'default';
break;
case 'http://iiif.io/api/image/2/level1.json':
_this.quality = 'default';
break;
case 'http://iiif.io/api/image/2/level0.json':
case /^http:\/\/iiif.io\/api\/image\/2.*$/.test(profile):
_this.quality = 'default';
break;
}
Expand Down

0 comments on commit 87671e7

Please sign in to comment.