[annotator-dev] Fwd: Basic workings
tilgovi at hypothes.is
Tue Oct 14 20:16:20 UTC 2014
On Tue, Oct 14, 2014 at 1:09 PM, Tim Casling <tcas at burwil.co.uk> wrote:
> I think #3 might be an issue with the HTML on my side. It comes from an
> DITA XML->HTML transform and there is some strange ordering of elements. I
> will investigate more, but it appears to be the first heading in the
> document whose stored annotation has no start or end range and when the
> page is populated with annotations the one with no start and end get
> repeated in other places.
> On #1, I have set loadFromSearch: false when loading the store plugin so I
> am now getting annotation without calling search. However, it seems to be
> choosing ALL annotations. How do I tell it to only retrieve them for the
> current URI. When I had loadFromSearch set, I had annotationData set to
> uri: window.location.pathname to say which annotations it should find. How
> do i do the same for loadAnnotations?
Ah. Sadly, I think there isn't a way on v1.2.x to add the Store plugin
without causing an initial search to happen. When I referred to
`loadAnnotations` I was thinking that you would get the annotations from
your data store with your own code, and then just pass them to annotator
directly, without a Store plugin. But alas. If you want to re-use the
existing Store plugin we'll want to modify it not to perform an initial
search if that's a need of yours.
> Apologies for the newbie questions.
No apologies necessary :-D
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the annotator-dev