Search code examples
javascripthtmlcssannotationscustomization

@recogito/annotorious : show annotation below rectangle always


I am using https://github.com/recogito/annotorious to draw annotation over image. enter image description here I want to show annotation text always. enter image description here

Below is I am trying code.

const anno = Annotorious.init({
    image: 'test',
    locale: 'auto',
    widgets: [{ widget: 'COMMENT' }],
});
         
// This is I am trying, but, this is not that function, Is there other option or plugin ?
anno.setVisible(true);

Is there other option or plugin ?


Solution

  • If you want the text to display always, you should take a look at the Shape Labels plugin: https://github.com/recogito/recogito-client-plugins/tree/main/packages/annotorious-shape-labels

    It will display three first tag in the annotation, but you can tweak the code easily to show e.g. the comment instead.