Skip to content

Commit

Permalink
Fix problem with "current view" breaking for v3 images (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasfranck authored Mar 14, 2024
1 parent 4923bcd commit 393fe63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ export default class OpenSeadragonExtension extends BaseExtension<Config> {

getImageId(canvas: Canvas): string | null {
if (canvas.externalResource) {
const id: string | undefined = canvas.externalResource.data["@id"];
const id: string | undefined = canvas.externalResource.data["@id"] || canvas.externalResource.data.id;

if (id) {
return id.substr(id.lastIndexOf("/") + 1);
Expand Down Expand Up @@ -1339,7 +1339,7 @@ export default class OpenSeadragonExtension extends BaseExtension<Config> {
id += "/";
}

if (Utils.isImageProfile(service.getProfile())) {
if (Utils.isImageProfile(service.getProfile()) || Utils.isImageServiceType(service.getIIIFResourceType())) {
infoUri = id + "info.json";
}
}
Expand Down

0 comments on commit 393fe63

Please sign in to comment.