Skip to content

Commit b2aff26

Browse files
[DSC-1298] Mirador configuration
1 parent 78721ab commit b2aff26

1 file changed

Lines changed: 118 additions & 118 deletions

File tree

src/mirador-viewer/config.default.js

Lines changed: 118 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const notMobile = params.get('notMobile');
2929
const canvasId = params.get('canvasId');
3030

3131
let windowSettings = {};
32-
let sidbarPanel = 'info';
32+
let sideBarPanel = 'info';
3333
let defaultView = 'single';
3434
let multipleItems = false;
3535
let thumbNavigation = 'off';
@@ -39,7 +39,7 @@ windowSettings.manifestId = manifest;
3939
(() => {
4040
if (searchOption) {
4141
defaultView = 'book';
42-
sidbarPanel = 'search';
42+
sideBarPanel = 'search';
4343
multipleItems = true;
4444
if (notMobile) {
4545
thumbNavigation = 'far-right';
@@ -48,7 +48,7 @@ windowSettings.manifestId = manifest;
4848
windowSettings.defaultSearchQuery = query;
4949
}
5050
} else {
51-
if(multi) {
51+
if (multi) {
5252
multipleItems = multi;
5353
if (notMobile) {
5454
thumbNavigation = 'far-right';
@@ -61,127 +61,127 @@ windowSettings.manifestId = manifest;
6161
}
6262
})();
6363

64-
(Mirador.viewer(
65-
{
66-
id: 'mirador',
67-
mainMenuSettings: {
68-
show: true
69-
},
70-
thumbnailNavigation: {
71-
defaultPosition: thumbNavigation, // Which position for the thumbnail navigation to be be displayed. Other possible values are "far-bottom" or "far-right"
72-
displaySettings: true, // Display the settings for this in WindowTopMenu
73-
height: 120, // height of entire ThumbnailNavigation area when position is "far-bottom"
74-
width: 100, // width of one canvas (doubled for book view) in ThumbnailNavigation area when position is "far-right"
75-
},
76-
themes: {
77-
light: {
78-
palette: {
79-
type: 'light',
80-
primary: {
81-
main: '#266883',
82-
},
83-
secondary: {
84-
main: '#b03727',
85-
},
86-
shades: { // Shades that can be used to offset color areas of the Workspace / Window
87-
dark: '#eeeeee',
88-
main: '#ffffff',
89-
light: '#ffffff',
90-
},
91-
highlights: {
92-
primary: '#ffff00',
93-
secondary: '#00BFFF',
94-
},
95-
search: {
96-
default: { fillStyle: '#00BFFF', globalAlpha: 0.3 },
97-
hovered: { fillStyle: '#00FFFF', globalAlpha: 0.3 },
98-
selected: { fillStyle: '#ff0900', globalAlpha: 0.3 },
99-
},
100-
},
64+
const miradorConfiguration = {
65+
id: 'mirador',
66+
mainMenuSettings: {
67+
show: true,
68+
},
69+
thumbnailNavigation: {
70+
defaultPosition: thumbNavigation, // Which position for the thumbnail navigation to be displayed. Other possible values are "far-bottom" or "far-right"
71+
displaySettings: true, // Display the settings for this in WindowTopMenu
72+
height: 120, // height of entire ThumbnailNavigation area when position is "far-bottom"
73+
width: 100, // width of one canvas (doubled for book view) in ThumbnailNavigation area when position is "far-right"
74+
},
75+
themes: {
76+
light: {
77+
palette: {
78+
type: 'light',
79+
primary: {
80+
main: '#266883',
10181
},
102-
dark: {
103-
palette: {
104-
type: 'dark',
105-
primary: {
106-
main: '#2790b0',
107-
},
108-
secondary: {
109-
main: '#eeeeee',
110-
},
111-
highlights: {
112-
primary: '#ffff00',
113-
secondary: '#00BFFF',
114-
},
115-
},
82+
secondary: {
83+
main: '#b03727',
11684
},
117-
},
118-
selectedTheme: 'light',
119-
data: [manifest],
120-
windows: [
121-
windowSettings
122-
],
123-
miradorSharePlugin: {
124-
dragAndDropInfoLink: 'https://iiif.io',
125-
embedOption: {
126-
enabled: true,
127-
embedUrlReplacePattern: [
128-
/.*/,
129-
embedURL
130-
],
131-
syncIframeDimensions: {
132-
height: {param: 'maxheight'},
133-
},
85+
shades: { // Shades that can be used to offset color areas of the Workspace / Window
86+
dark: '#eeeeee',
87+
main: '#ffffff',
88+
light: '#ffffff',
13489
},
135-
shareLink: {
136-
enabled: true,
137-
manifestIdReplacePattern: [
138-
/\/iiif\/manifest/,
139-
'',
140-
],
90+
highlights: {
91+
primary: '#ffff00',
92+
secondary: '#00BFFF',
93+
},
94+
search: {
95+
default: {fillStyle: '#00BFFF', globalAlpha: 0.3},
96+
hovered: {fillStyle: '#00FFFF', globalAlpha: 0.3},
97+
selected: {fillStyle: '#ff0900', globalAlpha: 0.3},
14198
},
14299
},
143-
miradorDownloadPlugin: {
144-
restrictDownloadOnSizeDefinition: false
145-
},
146-
window: {
147-
allowClose: false,
148-
// sideBarOpenByDefault: false,
149-
allowFullscreen: true,
150-
allowMaximize: false,
151-
defaultView: defaultView,
152-
sideBarOpen: notMobile,
153-
allowTopMenuButton: true,
154-
defaultSidebarPanelWidth: 230,
155-
switchCanvasOnSearch: true,
156-
views: [
157-
{ key: 'single', behaviors: ['individuals'] },
158-
{ key: 'book', behaviors: ['paged'] },
159-
{ key: 'scroll', behaviors: ['continuous'] },
160-
{ key: 'gallery' },
161-
],
162-
panels: {
163-
info: true,
164-
attribution: false,
165-
canvas: true,
166-
search: searchOption,
167-
layers: false,
100+
},
101+
dark: {
102+
palette: {
103+
type: 'dark',
104+
primary: {
105+
main: '#2790b0',
106+
},
107+
secondary: {
108+
main: '#eeeeee',
109+
},
110+
highlights: {
111+
primary: '#ffff00',
112+
secondary: '#00BFFF',
168113
},
169-
sideBarPanel: sidbarPanel
170114
},
171-
workspace: {
172-
allowNewWindows: false,
173-
showZoomControls: true,
174-
type: 'mosaic'
115+
},
116+
},
117+
selectedTheme: 'light',
118+
data: [manifest],
119+
windows: [
120+
windowSettings,
121+
],
122+
miradorSharePlugin: {
123+
dragAndDropInfoLink: 'https://iiif.io',
124+
embedOption: {
125+
enabled: true,
126+
embedUrlReplacePattern: [
127+
/.*/,
128+
embedURL,
129+
],
130+
syncIframeDimensions: {
131+
height: {param: 'maxheight'},
175132
},
176-
workspaceControlPanel: {
177-
enabled: false
178-
}
179133
},
180-
[
181-
miradorShareDialogPlugin,
182-
miradorSharePlugin,
183-
miradorDownloadDialog,
184-
miradorDownloadPlugin
185-
]
186-
)
187-
)(manifest);
134+
shareLink: {
135+
enabled: true,
136+
manifestIdReplacePattern: [
137+
/\/iiif\/manifest/,
138+
'',
139+
],
140+
},
141+
},
142+
miradorDownloadPlugin: {
143+
restrictDownloadOnSizeDefinition: false,
144+
},
145+
window: {
146+
allowClose: !0,
147+
// sideBarOpenByDefault: false,
148+
allowFullscreen: true,
149+
allowMaximize: false,
150+
defaultView: defaultView,
151+
sideBarOpen: notMobile,
152+
allowTopMenuButton: true,
153+
defaultSidebarPanelWidth: 230,
154+
switchCanvasOnSearch: true,
155+
views: [
156+
{key: 'single', behaviors: ['individuals']},
157+
{key: 'book', behaviors: ['paged']},
158+
{key: 'scroll', behaviors: ['continuous']},
159+
{key: 'gallery'},
160+
],
161+
panels: {
162+
info: true,
163+
attribution: false,
164+
canvas: true,
165+
search: searchOption,
166+
layers: false,
167+
},
168+
sideBarPanel: sideBarPanel,
169+
},
170+
workspace: {
171+
allowNewWindows: !0,
172+
showZoomControls: true,
173+
type: 'mosaic',
174+
},
175+
workspaceControlPanel: {
176+
enabled: !0,
177+
}
178+
};
179+
180+
const miradorPlugins = [
181+
miradorShareDialogPlugin,
182+
miradorSharePlugin,
183+
miradorDownloadDialog,
184+
miradorDownloadPlugin,
185+
];
186+
187+
Mirador.viewer(miradorConfiguration, miradorPlugins);

0 commit comments

Comments
 (0)