diff --git a/public/index.html b/public/index.html index e7842b1fdae6cbf055d4eb965853a4bb510e52ab..569da3096bf781c1fe606821df4f44fae04a00e9 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ <title>Mirador Video Annotations</title> </head> <body> - <div id="demo"></div> - <script src="/dist/main.js"></script> + <div id="mirador"></div> + <script src="dist/main.js"></script> </body> </html> diff --git a/src/index.js b/src/index.js index f0b501b55d4ef7ada83a58d2d5f18b7559bf9ef4..d7e5541ee46af9aec3c7b77297de3d1f3da5c194 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,16 @@ import Mirador from 'mirador/dist/es/src/index'; +import annotationPlugins from 'mirador-annotations/es/index'; +import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter'; +import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter'; const config = { - id: 'demo', + id: 'mirador', theme: { transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, }, + annotation: { + adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`), + exportLocalStorageAnnotations: true, + }, catalog: [ { manifestId: 'http://localhost/dzkimgs_annotated_video.json' }, { manifestId: 'http://localhost/video_split_annopage.json' }, @@ -17,4 +24,5 @@ const config = { } Mirador.viewer(config, [ + ...annotationPlugins, ]);