annotorious / annotorious-openseadragon

An OpenSeadragon plugin for annotating high-res zoomable images
https://annotorious.github.io
BSD 3-Clause "New" or "Revised" License
121 stars 42 forks source link

Update problem while editing shapes #86

Closed ufuk23 closed 3 years ago

ufuk23 commented 3 years ago

I use the annotorious with annotorious-shape-labels.min.js like below. When I edit the shape, it is not updated with the last values. I get x, y, width, height values of the shape always as first values, so the shape values (x, y, width, height) cannot be changed for the second time.

        anno = Annotorious.init({
          image: 'hallstatt',
          locale: 'auto',
      disableEditor: true,
      formatter: Annotorious.ShapeLabelsFormatter()
        });

The picture below shows that the rectangle x,y, width, height are not correct values after editing the shape. image

rsimon commented 3 years ago

It looks like you are using headless mode, right? And the annotation is still being edited - which means the values are not yet updated by design.

After you have saved the changes (by clicking outside the shape, so that the resize handles are gone), is the value still not updated?

ufuk23 commented 3 years ago

Yes, you are right it is the headless mode. It works for the sample page. But I cannot click the outside because I use the annotorious-openseadragon, and it doesn't let me click the outside of the shape. As I use the headless mode there is no OK button to stop editing, which means I cannot stop editing with headless mode and OSD

rsimon commented 3 years ago

This is part of a larger issue that requires a redesign of headless mode in Annotorious OpenSeadragon: https://github.com/recogito/annotorious-openseadragon/issues/74

I'll try to prioritize this.

rsimon commented 3 years ago

Click outside is now implemented (#76). The only other option (by design) to "save" an annotation is by using the API. E.g. an application using headless mode could have a save button underneath the image that calls the API .saveSelected method.