[annotator-dev] Hide annotator and reload annotations
Randall Leeds
tilgovi at hypothes.is
Thu Feb 13 23:03:30 UTC 2014
On Thu, Feb 13, 2014 at 8:56 AM, Steph Skardal <steph at endpoint.com> wrote:
> On 02/13/2014 11:44 AM, Riccardo Tasso wrote:
>
>> I don't know how to invoke it :)
>>
>
> Hmm, I invoked annotator functionality inside my plugin. Do you have a
> plugin set up? If you set up a plugin based on the documentation, in the
> scope of a plugin, "this" is the plugin and "this.annotator" is the
> annotator object, and I think you could invoke via
> this.annotator.destroy(). Your plugin could contain the on & off toggle and
> you could access the annotator in those methods.
>
Destroying the annotator from a plugin is a bit strange, but maybe not
totally ridiculous. The reason I say it's a bit strange is because calling
it will also invoke a destroy method on your plugin. If all is implemented
as it should be, your plugin shouldn't be around to toggle the annotator
back on.
I would ask how you're constructing the annotator to begin with. Are you
invoking the Annotator constructor directly, or using the jquery plugin
interface where you call .annotator() on a jquery object?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140213/58eeb49b/attachment-0004.html>
More information about the annotator-dev
mailing list