diff --git a/__tests__/src/actions/window.test.js b/__tests__/src/actions/window.test.js index bdccad8603e9e98de69fa9730d95c2c1b9fb024e..27eae582383cfe743c028569691d5105e391b6bd 100644 --- a/__tests__/src/actions/window.test.js +++ b/__tests__/src/actions/window.test.js @@ -45,7 +45,7 @@ describe('window actions', () => { ], elasticLayout: { height: 400, - width: 400, + width: 480, x: 260, y: 300, }, diff --git a/src/config/settings.js b/src/config/settings.js index 43ec317f4b37dccf659a67a5e4fd3a67d00f7aa2..8ca8611ac9dc2f270d41496b7216fd00eb6280da 100644 --- a/src/config/settings.js +++ b/src/config/settings.js @@ -285,6 +285,10 @@ export default { { key: 'scroll', behaviors: ['continuous'] }, { key: 'gallery' }, ], + elastic: { + height: 400, + width: 480 + } }, windows: [ // Array of windows to be open when mirador initializes (each object should at least provide a manifestId key with the value of the IIIF presentation manifest to load) /** diff --git a/src/state/actions/window.js b/src/state/actions/window.js index 64a92aeecb5656ee141a082b47d7f742852adfdc..e4f840bbbfcdca7d193a5fc78a44ebcee3e7c57b 100644 --- a/src/state/actions/window.js +++ b/src/state/actions/window.js @@ -83,8 +83,7 @@ export function addWindow({ companionWindows, manifest, ...options }) { }; const elasticLayout = { - height: 400, - width: 400, + ...(config.window.elastic || { height: 400, width: 480 }), x: 200 + (Math.floor(numWindows / 10) * 50 + (numWindows * 30) % 300), y: 200 + ((numWindows * 50) % 300), };