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 43 forks source link

Annotations can be moved #183

Open RahelaPogacean opened 11 months ago

RahelaPogacean commented 11 months ago

Hello! I am developing an application using Annotorious with OSD and I can move the annotations with drag & drop. Is there any possibility to disable this option?

rsimon commented 11 months ago

The readOnly option is probably what you're looking for: https://annotorious.github.io/api-docs/osd-plugin/#readonly

rsimon commented 11 months ago

If you want to make the shape locked, but keep the comments editable, I think you can do something like this:

var anno = Annotorious.init({
  image: 'hallstatt',
  readOnly: true,
  widgets: [
    { widget: 'COMMENT', editable: true }
  ]
});

But actually not quite sure anymore... Annotorious v3 is already on the horizon and will allow for more flexibility concerning permissions and editing rules.

RahelaPogacean commented 11 months ago

@rsimon I want to not be able to move the annotation, but still be able to edit the points

rsimon commented 11 months ago

Only change the shape but not move it? Sorry that's not possible. You might be able to work around by making the shape transparent to pointer events using CSS perhaps.

ferropasha commented 10 months ago

Is the reverse possible? That is for a user to be able to move selection frame around, but not to change it's shape?

rsimon commented 10 months ago

No sorry. Not possible either. But likewise, you could try removing the handles via CSS.