[annotator-dev] I have issues migrating from v1.2x to the latest

rubin apore rubin.apore at gmail.com
Sat Jul 11 01:13:48 UTC 2015


In  the "annotationViewerShown" event handler, i loop through all the
annotations shown in viewer and then add the image of the user that created
the annotation.
eg.


annotator.subscribe("annotationViewerShown",
      function(viewer, annotations) {
        $('.annotator-viewer .annotator-widget
.annotator-item').each(function(index, elem){ //each annotation item in the
viewer
           $(elem).addAnnotationCreatorImage(annotations[index]) //
addAnnotationCreatorImage
takes the annotation, finds the creator's image and appends it to the
annotator-item in the viewer
        })
})


In short , i need to add additional information to each of the displayed
annotation item in the viewer.

On Fri, Jul 10, 2015 at 10:25 PM, Randall Leeds <tilgovi at hypothes.is> wrote:

> Those events no longer exist in v2.
>
> Would you please describe what you're trying to achieve with these events
> and we can talk through whether we need to add something similar in v2 or
> whether there's a better way to accomplish your goals in the new version.
>
> This is exactly why we haven't taken v2 out of alpha yet, by the way.
> Thank you so much for testing and offering feedback. I really appreciate it.
>
> On Mon, Jun 22, 2015 at 1:00 PM rubin apore <rubin.apore at gmail.com> wrote:
>
>> i am building a browser widget that loads Annotatorjs v1.2x into any
>> website a user visits, this was working perfectly well on many websites
>> except a few, like gmail.com. When i looked at the console, i realised
>> annotatorjs and the content script js were conflicting, looks likes
>> annotatorjs was modifying an element that the contentent script in
>> gmail.com  didnt like.
>> My solution was to use the latest version of Annotatorjs, this worked
>> well, no conflict. My problem no is migrating my current code base .
>>
>> In my widget, i had a plugin that listened to :
>> 1. annotationCreated
>> 2. annotationEditorShown
>> 3.annotationViewerShown , etc
>>
>> the problem is, i cant find the events or hooks for
>> annotationEditorShown. and annotationViewerShown in the current version of
>> annotator js. HOW DO I ATTACH MY HANDLERS TO THE annotationEditorShown,
>> annotationViewerShown in the current version of annotatorjs .
>>
>> i would appreciate any form of help
>>
>>
>> _______________________________________________
>> 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/20150711/4614ca13/attachment-0004.html>


More information about the annotator-dev mailing list