CenterForDigitalHumanities / TPEN-interfaces

Vanilla default and internally useful interfaces for the TPEN ecosystem that exemplify how you might build your own interfaces for specific projects.
0 stars 1 forks source link

Basic Interface for adding annotations #12

Open cubap opened 5 months ago

cubap commented 5 months ago

Given the programmatic loading of a single page, the user can create a new fragmentSelector Annotation.

Load

For this case, the user would be navigating to a Page in a Project. For some reason, perhaps a detection that there are no annotations, the user will be interacting with an Interface where they can draw new Lines on the Page.

This issue assumes the Project is already known and the User is authenticated, so this can all be hardcoded as a demo.

Render

On screen, the User will expect a depiction of the Page image (Canvas.items[0].items[0]). If there is an Annotation in the Layer already, that should also be drawn. Finally, some interaction element for drawing a new annotation should be visible.

Annotate

Most simply, the User can delete/remove and create a new Annotation. This should be saved through the TPEN API to save an Annotation to a Layer.

cubap commented 4 months ago

These 200 lines are where it happens in TPEN28:

https://github.com/CenterForDigitalHumanities/TPEN28/blob/6b5b057d94a1164b259609110def227913490cff/web/js/transcribe.js#L3724