[annotator-dev] Fwd: Basic workings

Tim Casling tcas at burwil.co.uk
Wed Oct 15 09:24:29 UTC 2014


 What I am struggling with is whether what is should be experiencing out of
the box is a reasonably sound annotation experience or just a rough demo.
I have a feeling it is the former, but I am experiencing the latter, I
suspect due to misconfiguration and lack of investigation on my part.

Going back to my multiple annotation issue.  I have a document with
multiple h1s and if I add an annotation to a h1, it gets stored as /h1[1]
even if it is the nth h1 in the document. When the /h1[1] annotation is
applied to the document in the browser, the annotation appears on all h1s.
If I changed the document to have a singe h1 and multiple h2s, a comment on
the h1 heading also appears on the h2s and comments on the h2s appear on
the other h2s.  Same with paragraphs in fact.  The path is just not being
stored correctly for the annotated element.

Could someone just confirm that the paths (XPaths?) that annotator creates
are normally OK and what I am observing is not expected behavior?

In the documents I am working with, there is a <div id="main-wrapper"> that
wraps the document <body> and so I have used:

var content=$('#main-wrapper').children().annotator();
content.annotator('addPlugin, 'Store', { etc

to initialize the annotator.

Any of this sounding dodgy?


Thanks
Tim

On 14 October 2014 23:16, Randall Leeds <tilgovi at hypothes.is> wrote:

> On Tue, Oct 14, 2014 at 1:49 PM, Tim Casling <tcas at burwil.co.uk> wrote:
>
>> So if i understand this correctly: at the moment it retrieves all
>> annotations without filtering on url and if it finds a range within the
>> document that corresponds to the annotation range, it adds the annotation.
>>
>> I'm just trying to get something working that demonstrates the value of
>> using the library, so if i have to use loadFromSearch until I get more
>> familiar and can modify the code myself, that's OK.
>>
>
> That would be the easiest. If you set `loadFromSearch` to false you're not
> disabling the initial search, you're just removing all the filtering on it
> so that it returns all annotations.
>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20141015/a48b7c36/attachment-0004.html>


More information about the annotator-dev mailing list