Closed robcast closed 4 years ago
I have an implementation of WebAnnotation.js
that creates JSON with an array of selectors:
https://github.com/robcast/mirador-annotations/blob/alternate-target-selector/src/WebAnnotation.js
In the last commit I decided that it is better to always create a selector, even when we only have a fragment. I can back that out if you think we should keep generating just a target with appended fragment.
I also have a SAS adapter version to match:
I even have a test version that translates OpenAnnotations into WebAnnotations with multiple selectors:
but it crashes in Mirador's AnnotationItem.js:171
because that assumes selector
can't be an array ;-(
@robcast yep working on an upstream fix right now
Web Annotation supports multiple alternative selectors on a target, e.g. a SVG annotation and a
#xywh
fragment bounding box:"Multiple Selectors SHOULD select the same content, however some Selectors will not have the same precision as others. Consuming user agents MUST pick one of the described segments, if they are different." (https://www.w3.org/TR/annotation-model/#selectors)
Mirador 2 annotations already support this using an
oa:Choice
selector:In WebAnno this could become:
The annotation plugin needs to
SvgSelector
FragmentSelector
for anySvgSelector