universalviewer
universalviewer copied to clipboard
Support search result annotation on whole canvas
http://exist.scta.info/exist/apps/scta/iiif/pp-sorb/search?q=fide
Some of the results target the whole canvas (not a #xywh region of it).
{
resource: {
@type: "cnt:ContentAsText",
chars: "..."
},
motivation: "sc:painting",
@type: "oa:Annotation",
@id: "http://scta.info/iiif/pp-sorb/search/annotations/prIV-sqtlch",
on: "http://scta.info/iiif/pp-sorb/canvas/S212v"
}
This means they fall foul of this regex in SearchResult:
this.canvasIndex = provider.getCanvasIndexById(resource.on.match(/(.*)#/)[1]);
(manifest: http://scta.info/iiif/pp-sorb/manifest)
For this result there is no region to paint. Would look odd to paint the whole canvas; but how to convey to the user that the whole page is the result?
@edsilv I think this may be the same issue as what I reported in slack. Not including the xywh fragment results in this error:
TypeError: e.on.match(...) is null app.js:9:6008
Work around is to use "#xywh=0,0,0,0"
All issues will be triaged for further investigation or closure by the 28 September 2023. If your issue is still relevant and would like for it be investigated further please comment by 14 September 2023.
This should be fixed if it's still an issue. Many anno search results will target the whole canvas - search-within isn't just for OCR-generated data, it could be a textual description of a photograph, for example, which the search-within could find within an album of 500 photos.
(but also update for Search v2)