[annotator-dev] Hide annotator and reload annotations

Steph Skardal steph at endpoint.com
Thu Feb 13 15:55:48 UTC 2014


On 02/13/2014 10:03 AM, Riccardo Tasso wrote:
> Hi all,
>    I'm almost finished integrating annotator to my web application, 
> but I'm investigating on the following funtionalities.
>
> First of all I'd like to hide all the annotator related stuff 
> (annotations, higliting, ...) to offer the reader a clean view. How is 
> possibile hide or destroy the annotator?
>
> After the reading I'd like to re-enable annotator, reloading new 
> annotations from store. How can I reload annotations without reloading 
> the whole page?
>

Hi Riccardo,

 From what I could tell, there is no way to toggle the readOnly option 
dynamically after the annotator has been loaded.

However, I did accomplish the method of reloading annotations (for 
another use case) by executing the Store._onLoadAnnotationsMethod 
(https://github.com/berkmancenter/h2o/blob/master/public/javascripts/h2o-annotator.js#L696) 
upon a certain onclick.

Also, of note, I was able to loop through the annotations and 
temporarily remove annotations 
(https://github.com/berkmancenter/h2o/blob/master/public/javascripts/collages_annotatorv2.js#L254-260 
and 
https://github.com/berkmancenter/h2o/blob/master/public/javascripts/h2o-annotator.js#L699-721).

My use case for this functionality is a bit different from what you 
intend to do, but it does contain the basics of loading additional 
annotations and deleting annotations on the fly.

Steph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140213/72a541fd/attachment-0004.html>


More information about the annotator-dev mailing list