A wrapper around the annotation studio for the narrative editor. Provides its own prop-interface for editing annotations. It will use the 2 related plugins to extend functionality beyond the vanilla annotation studio.
<AnnotationStudio
manifestId=""
manifestJson={{ /* ... */ }}
canvas="http://.."
onCreateAnnotation={(annotation, index) => (/* ... */)}
onDeleteAnnotation={(annotation, index) => (/* ... */)}
onUpdateAnnotation={(annotation, index) => (/* ... */)}
onUpdateAnnotationOrder={newOrder => {/* ... */}}
/>
The annotation studio should be a controlled input. The manifestJson passed in will not be re-evaluated unless the manifestId changes. Annotation studio component will update its own internal state of the annotation lists. This might change if problems come up.
This will also include plugins for annotation studio:
- Import manifest
- Export manifest
They could be their own modules, or part of the same.
- Annotation Studio Component can be used as a regular
React
component:
<AnnotationStudio
manifestId=""
manifestJson={{ /* ... */ }}
canvas="http://.."
onCreateAnnotation={(annotation, index) => (/* ... */)}
onDeleteAnnotation={(annotation, index) => (/* ... */)}
onUpdateAnnotation={(annotation, index) => (/* ... */)}
onUpdateAnnotationOrder={newOrder => {/* ... */}}
/>
This case it directly mutates the passed manifest json.
Or as a Redux component: in which case the presley.js store provides all the necessary parameters
The Redux version can immediately used with other components like: