[annotator-dev] Anchoring tolerance to annotated content edits

Randall Leeds randall at bleeds.info
Fri Sep 29 18:12:04 UTC 2017

On Fri, Sep 29, 2017 at 10:01 AM Cloutier, Philippe (DGARI-Consultant) <
Philippe.Cloutier.externe at mern-mffp.gouv.qc.ca> wrote:

> Hi,
> Tiki Wiki CMS Groupware has an experimental integration of annotator.js
> which I am testing. The basics are working. The big problem is we're
> annotating wiki pages which frequently change, so anchoring robustness
> needs to be reasonably good.

I noticed you also asked about anchoring on the Hypothesis mailing list.
I'll let most of the discussion happen there as it is a more active project
than Annotator.js, and it is designed to address this issue.

> Apparently, after a change, annotations are not displayed somewhere they
> should not, which is great. Unfortunately, after a change, there is a high
> risk that an annotation "disappears" (stops being displayed). Annotator's
> anchoring strategy seems to be to record start and end offsets on the
> annotated text's containing elements and to record the annotated text. If
> the annotated text changes its position in its containing element or if the
> containing element's path changes, the annotation stops displaying. Which
> means that several common changes have a nearly 50% chance of breaking
> anchoring:
> 1. Fixing a typo in the annotated text's parent elements.
> 2. Adding, removing or moving a sibling (such as a paragraph) of the
> parent elements.

Annotator does use a DOM Range representation consisting of document nodes
and offsets. There is no easy way to change this.

> Am I missing a document on Annotator's anchoring robustness acknowledging
> this situation and/or suggesting ways to increase tolerance to
> modifications of the annotated content?

You did not miss anything. This is a known limitation of Annotator.js. It
was not originally designed for this use case.

I have stopped working on Annotator.js in order to focus the limited
availability I have for annotation projects on Apache Annotator (
https://annotator.apache.org). Hypothesis uses a number of standalone
libraries for anchoring, most of which should find their way into the
Apache Annotator umbrella.


You may use these to implement your own annotation tools if Hypothesis
turns out to be difficult to customize to your needs. However, I hope that
Hypothesis will be able to satisfy your use case, as that would be the
easiest road.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20170929/2ee097f9/attachment-0003.html>

More information about the annotator-dev mailing list