[annotator-dev] Rendering Annotations from Store

Randall Leeds tilgovi at hypothes.is
Tue Mar 17 14:26:25 UTC 2015


Look at the provided Store plugin for inspiration. The Annotator object has
these methods (v1.2.x):

- setupAnnotation
- loadAnnotations

Unfortunately, there's no teardown/unload for annotations.

On Tue, Mar 17, 2015 at 6:15 AM, Neil Kuruppu <neil at mergerlinks.com> wrote:

> Hi,
>
> I’ve been working on a store allowing integration/storage of annotations
> within Meteor Collections. The process of creating, updating and deleting
> annotations works ( I used the API reference and the sample code below).
>
> However I’ve not found material documenting the API calls required to take
> data from a store/collection/array and render the individual annotations on
> the appropriate page. I’m going to go look at Annotator Store on Github but
> was hoping there might be a quick insight that could point me in the right
> direction.
>
> Cheers
>
> Neil
>
> Annotator.Plugin.StoreLogger = function (element) {
>   return {
>     pluginInit: function () {
>       this.annotator
>           .subscribe("annotationCreated", function (annotation) {
>             console.info("The annotation: %o has just been created!", annotation)
>           })
>           .subscribe("annotationUpdated", function (annotation) {
>             console.info("The annotation: %o has just been updated!", annotation)
>           })
>           .subscribe("annotationDeleted", function (annotation) {
>             console.info("The annotation: %o has just been deleted!", annotation)
>           });
>     }
>   }
> };
>
>
>
> _______________________________________________
> 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/20150317/20db993b/attachment-0003.html>


More information about the annotator-dev mailing list