Skip to content
Snippets Groups Projects
Verified Commit bd35cefd authored by David Beniamine's avatar David Beniamine
Browse files

Trying to make annotation plugin work on a raw mirador

parent f1adc279
No related branches found
No related tags found
1 merge request!5Resolve "Image annotation plugin"
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"mirador": "git+https://gitlab.tetras-libre.fr/iiif/mirador-video-annotation#wip-webpack-from-git", "mirador": "^3.3.0",
"react": "^16.13.1", "react": "^16.13.1",
"react-dom": "^16.13.1", "react-dom": "^16.13.1",
"style-loader": "^1.2.1" "style-loader": "^1.2.1"
......
...@@ -4,25 +4,44 @@ import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter'; ...@@ -4,25 +4,44 @@ import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter'; import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter';
//const endpointUrl = 'http://127.0.0.1:3000/annotations';
//const config = {
// id: 'mirador',
// theme: { transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, },
// annotation: {
// adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
// exportLocalStorageAnnotations: true,
// },
// window: {
// defaultSideBarPanel: 'annotations',
// sideBarOpenByDefault: true,
// },
// catalog: [
// { manifestId: 'https://dzkimgs.l.u-tokyo.ac.jp/videos/iiif_in_japan_2017/manifest.json' },
// { manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json' },
// { manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843' }
// ]
//}
//
//Mirador.viewer(config, [
// ...annotationPlugins,
//]);
const endpointUrl = 'http://127.0.0.1:3000/annotations';
const config = { const config = {
id: 'mirador',
theme: { transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, },
annotation: { annotation: {
adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`), adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
exportLocalStorageAnnotations: true, // adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),
exportLocalStorageAnnotations: false, // display annotation JSON export button
},
id: 'mirador',
window: {
defaultSideBarPanel: 'annotations',
sideBarOpenByDefault: true,
}, },
catalog: [ windows: [{
{ manifestId: 'http://localhost/dzkimgs_annotated_video.json' }, loadedManifest: 'https://iiif.harvardartmuseums.org/manifests/object/299843',
{ manifestId: 'http://localhost/video_split_annopage.json' }, }],
{ manifestId: 'http://localhost/fediverse.json' }, };
{ manifestId: 'http://localhost/localvideo.json' },
{ manifestId: 'http://localhost/local_catvideo.json' },
{ manifestId: 'https://dzkimgs.l.u-tokyo.ac.jp/videos/iiif_in_japan_2017/manifest.json' },
{ manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json' },
{ manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843' }
]
}
Mirador.viewer(config, [ Mirador.viewer(config, [...annotationPlugins]);
...annotationPlugins,
]);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment