0

I am working on a project where you can annotate a zone (using Annotorious). Once you have finished annotating and push the "END TASK" button, it will redirect to the next task within the same project. My problem is that after I load the new image, I am no longer able to annotate. Before, I could switch between zoom and annotate mode.

To reset the image, I use the viewer destroy function from Annotorious 2.7.10, but I am concerned that this might affect the functionality of Annotorious and OpenSeadragon. How can I update the image and still be able to annotate?

OPENSEADRAGON CODE

var viewer = OpenSeadragon({
            id: "documentopdftranscribir",
            prefixUrl: "/static/img/openseadragon/",
            tileSources: {
                type: "image",
                url: url
            },
            showRotationControl: true, 
            showFlipControl: false,
            constrainDuringPan: true,
            showNavigator: false, 
        });

        anno = OpenSeadragon.Annotorious(viewer, {
            locale: 'auto',
            crosshair: false,
            drawOnSingleClick: true,
            allowEmpty: true,
            disableEditor: false, 
        });

and at the end of the code I got this

if(viewer){
  viewer.destroy();
}
dtejada
  • 1
  • 1
  • It seems like destroying and re-creating might be a fine solution. Are you encountering any trouble with that? – iangilman Jul 27 '23 at 21:19
  • Yes, I am. I'm working on this project using PYBOSSA, and every time the task is loaded, the viewer is created. The fact is that if I destroy the viewer, the new image appears, but I'm not able to annotate. However, if I didn't destroy it, the new image loads under the last image. – dtejada Aug 07 '23 at 10:58
  • Hmm. I don't know enough about Annotorious to be of help here. Have you tried filing an issue on their GitHub? – iangilman Aug 24 '23 at 16:17

0 Answers0