universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

Support search result annotation on whole canvas

Open tomcrane opened this issue 9 years ago • 4 comments

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?

tomcrane avatar Dec 09 '15 09:12 tomcrane

@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"

jronallo avatar Aug 06 '16 18:08 jronallo

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.

LlGC-szw avatar Aug 25 '23 11:08 LlGC-szw

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.

tomcrane avatar Nov 05 '23 17:11 tomcrane

(but also update for Search v2)

tomcrane avatar Nov 05 '23 17:11 tomcrane