Skip to content
Snippets Groups Projects
Verified Commit 4c5b39c0 authored by Loïs Poujade's avatar Loïs Poujade
Browse files

Merge branch 'main' into 8-populate-manifest-catalog

parents 32dde28b ab0ddbb0
Branches
No related tags found
1 merge request!7Populate Mirador catalog with files from /data
......@@ -2,6 +2,5 @@ www/
.env
node_modules/
dist/
package-lock.json
.cache/
.*.sw?
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -12,6 +12,7 @@
"dependencies": {
"css-loader": "^3.6.0",
"mirador": "git+https://gitlab.tetras-libre.fr/iiif/mirador-video-annotation#wip-webpack-from-git",
"mirador-annotations": "0.4.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"style-loader": "^1.2.1"
......
import Mirador from 'mirador/dist/es/src/index';
import LocalCatalog from './catalog.js';
import * as actions from 'mirador/dist/es/src/state/actions';
import annotationPlugins from 'mirador-annotations/es/index';
import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter';
const endpointUrl = 'http://127.0.0.1:3000/annotations';
const config = {
annotation: {
adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
// adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),
exportLocalStorageAnnotations: false, // display annotation JSON export button
},
id: 'demo',
theme: { transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, },
window: {
defaultSideBarPanel: 'annotations',
sideBarOpenByDefault: true,
},
windows: [{
loadedManifest: 'https://iiif.harvardartmuseums.org/manifests/object/299843',
}],
catalog: [
{ manifestId: 'http://localhost/dzkimgs_annotated_video.json' },
{ 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' }
]
}
};
let viewer = Mirador.viewer(config, []);
let viewer = Mirador.viewer(config, [...annotationPlugins]);
var store = viewer.store;
console.info('store: ', store);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment