Skip to content

Commit 78721ab

Browse files
[IIIF-110] refactoring to use the bitstream UUID as canvas identifier
1 parent ae1143e commit 78721ab

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/app/item-page/mirador-viewer/mirador-viewer.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export class MiradorViewerComponent implements OnInit {
3232
@Input() searchable: boolean;
3333

3434
/**
35-
* Is used as index of the element to show.
35+
* Is used as canvas identifier of the element to show.
3636
*/
37-
@Input() canvasIndex: number;
37+
@Input() canvasId: string;
3838

3939
/**
4040
* Hides embedded viewer in dev mode.
@@ -92,8 +92,8 @@ export class MiradorViewerComponent implements OnInit {
9292
if (this.notMobile) {
9393
viewerPath += '&notMobile=true';
9494
}
95-
if (this.canvasIndex) {
96-
viewerPath += `&canvasId=${this.canvasIndex}`;
95+
if (this.canvasId) {
96+
viewerPath += `&canvasId=${this.canvasId}`;
9797
}
9898

9999
// TODO: Should the query term be trusted here?

src/mirador-viewer/config.default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ windowSettings.manifestId = manifest;
5555
}
5656
}
5757
}
58-
if (canvasId != null && canvasId !== 'null' && +canvasId >= 0) {
58+
if (canvasId != null && canvasId !== 'null') {
5959
windowSettings.canvasId =
60-
`${(manifest.replace(MANIFEST_URL_PART, ''))}/canvas/c${canvasId}`;
60+
`${(manifest.replace(MANIFEST_URL_PART, ''))}/canvas/${canvasId}`;
6161
}
6262
})();
6363

0 commit comments

Comments
 (0)