Annotation examples

Help
2012-10-29
2012-10-29
  • AlexHenderson
    AlexHenderson
    2012-10-29

    Hi,

    I'd like to experiment with adding and modifying annotations, but I
    can't get my small brain around how to create an annotation
    interactively. Does anyone have an example?

    Thanks,
    Alex

     
  • Ruven
    Ruven
    2012-10-29

    Here's a test mock-up showing editing in action:
    http://merovingio.c2rmf.cnrs.fr/~ruven/iipmooviewer/annotation.html

    Basically you just need to include the src/annotations-edit.js file and run the function

     iipmooviewer.newAnnotation();
    

    to create a new empty annotation in the middle of your current view. In the example I've just attached it to a key press to illustrate how it works, but of course this is not a great idea. You should add an icon somewhere to perform this.

    You can then use the annotationChange event to update a database etc.

     


Anonymous


Cancel   Add attachments