digirati-co-uk / iiif-manifest-editor

Create new IIIF Manifests. Modify existing manifests. Tell stories with IIIF.
https://manifest-editor.digirati.services/
MIT License
31 stars 2 forks source link

Resource Editor: Media Annotation (MVP) #96

Open tomcrane opened 2 years ago

tomcrane commented 2 years ago

Also known as a Painting Annotation.

This uses another resource editor component - #94 It wraps it in additional editing, because the media resource is just the body; this editing UI also allows you to set the target.

For MVP this is JUST IMAGES.

The body of the annotation is edited with #94. The target is either the whole canvas, or a part of the canvas. If the canvas editing surface (#98) is visible, changing target values in the form elements moves/resizes the box on the canvas. If the user drags or resizes the box on the canvas, the target properties change.

If you created a Canvas with the New Canvas dialog, #52, then came back to look at that image in the UI, you'd see it in this component.

Fields

Note that type Annotation and motivation painting are fixed and not editable; these annos are, by definition, painting annos.

property editable here has further editor
label #67 no
summary #67 no
behavior #109 no
body yes - inline widget? #94
target MVP: x,y,w,h inline no

The target for MVP is something like:

[ ] whole canvas x: y: width: height:

If "whole canvas" is checked, the xywh are blanked and disabled. These update by themselves if visible and the user drags the annotation on the canvas.

We'll need to accommodate time-based targets later but not MVP.

Question: is this widget available independently? Or do we always wrap it in a Media Annotation Page editor?

tomcrane commented 2 years ago

Here's the "mini" mode:

image

The body launches #94 but the Target just shows #115 inline.

For painting annotations we condense all the available painting annos in all the pages under canvas.items into a single anno page, and hide the fact that this page is present in the UI.