Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example: window settings for sidebar panels and thumbnail strip #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
import Mirador from 'mirador/dist/es/src/index';
import examplePlugin from './plugins/example_plugin';

// Example: Show Shakespeare's comedies with sidepanel and thumbnail strip open
// TASK: Change these settings to show "The Comedie of Errors" by default
// CHALLENGE: Use the canvasId instead of canvasIndex
const config = {
id: 'mirador-viewer',
windows: [
{
manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest',
}
],
id: 'mirador-viewer',
window: {
// Use Index panel as default panel for all windows
sideBarPanel: 'canvas', // Configure which sidebar is selected by default. Options: info, attribution, canvas, annotations, search
},
windows: [{
manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/390fd0e8-9eae-475d-9564-ed916ab9035c.json',
thumbnailNavigationPosition: 'far-right',
sideBarOpen: true, // Always show this manifest with sidebar open,
canvasIndex: 22
}],
};

const plugins = [];

Mirador.viewer(config, plugins);
Mirador.viewer(config, plugins);