-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canvas.getContent() cannot get content on second and later AnnotationPage #86
Comments
Would be interested to know the desired user interface when a viewer comes across more than one annotation page associated with a canvas. Is this to be interpreted in a similar way to layers? |
Thanks for your comment and for adding the feature so quickly #87 ! That recipe comes from the cookbook, https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/. {
"id": "https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/canvas/1",
"type": "Canvas",
"width": 1920,
"height": 1080,
"duration": 7278.46,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/canvas/1/annotation_page/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/canvas/1/annotation_page/1/annotation/1",
"type": "Annotation",
"motivation": "painting",
"target": "https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/canvas/1#t=0,3971.24",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/donizetti-elixir/vae0637_accessH264_low.mp4",
"type": "Video",
"format": "video/mp4",
"height": 1080,
"width": 1920,
"duration": 3971.24
}
},
{
"id": "https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/canvas/1/annotation_page/1/annotation/2",
"type": "Annotation",
"motivation": "painting",
"target": "https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/canvas/1#t=3971.24",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/donizetti-elixir/vae0637_accessH264_low_act_2.mp4",
"type": "Video",
"format": "video/mp4",
"height": 1080,
"width": 1920,
"duration": 3307.22
}
}
]
}
]
} Aside from that recipe's appropriateness, the specification allows for Canvas to have multiple AnnotaionPage, so it would be interesting to know if what kind of behavior the people who set up the specification had in mind as desirable. |
In the recipe provided at https://iiif.io/api/cookbook/recipe/0064-opera-one-canvas/, one
Canvas
has twoAnnotationPage
objects.Canvas.getContent()
does not seem to be able to get the second AnnotationPage content.Currently, this output goes as follows.
This seems to be because only the first element is processed in the line shown below.
https://github.com/IIIF-Commons/manifesto/blob/master/src/Canvas.ts#L150
I don't know if this is an issue that the recipe needs to be fixed or
Canvas.getContent()
needs to be improved.If the modification of
Canvas.getContent()
causes backward compatibility issues, you might consider creating new methods, such asCanvas.getContents()
,Canvas.getContentByIndex()
, etc.If the recipe should be modified, please let me know. I'll report it to the recipe repository.
The text was updated successfully, but these errors were encountered: