[annotator-dev] Creating a Mobile WebView Javascript Bridge

Hari G hari_g at hotmail.com
Fri Feb 12 05:41:17 UTC 2016

Hi All:
I am developing annotation UI in a mobile native app. The annotator.js (2.x) is loaded in the webview page and I am building native controls for annotation UI. Hence I am not using the included UI. Instead I send messages to native side using a hidden iframe. My problem here is how to get the corresponding annotation object when a user taps on an annotation. Looking through the code I used the jQuery click event handler to get the annotation click... 
$(options.element).on('click', '.annotator-hl', function (event) {...}
But I could not find how to get the original annotation object from here. Any help would be greatly appreciated. I worked around by keeping a copy of the annotation objects in my own storage plugin but the problem is highlighter would not undraw highlight if the _local object is missing. The storage adapter strips the _local before passing to my storage plugin :-(
Any help is greatly appreciated...
Hari Gangadharan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20160211/48ee2930/attachment-0003.html>

More information about the annotator-dev mailing list