Skip to content
Snippets Groups Projects
Commit 4bc687dc authored by Chris Beer's avatar Chris Beer
Browse files

Push the rest of the default mirador state into settings

parent 912aeb5a
Branches
Tags
No related merge requests found
import uuid from 'uuid/v4';
export default { export default {
canvasNavigation: { // Set the hight and width of canvas thumbnails in the CanvasNavigation companion window canvasNavigation: { // Set the hight and width of canvas thumbnails in the CanvasNavigation companion window
height: 50, height: 50,
...@@ -258,6 +260,8 @@ export default { ...@@ -258,6 +260,8 @@ export default {
width: 100, // width of one canvas (doubled for book view) in ThumbnailNavigation area when position is "far-right" width: 100, // width of one canvas (doubled for book view) in ThumbnailNavigation area when position is "far-right"
}, },
workspace: { workspace: {
draggingEnabled: true,
id: uuid(),
exposeModeOn: false, // unused? exposeModeOn: false, // unused?
height: 5000, // height of the elastic mode's virtual canvas height: 5000, // height of the elastic mode's virtual canvas
showZoomControls: false, // Configure if zoom controls should be displayed by default showZoomControls: false, // Configure if zoom controls should be displayed by default
......
import uuid from 'uuid/v4'; import settings from '../../config/settings';
import ActionTypes from '../actions/action-types'; import ActionTypes from '../actions/action-types';
/** Check if the viewport dimensions are fully specified */ /** Check if the viewport dimensions are fully specified */
...@@ -21,10 +21,7 @@ function contains(container, containee) { ...@@ -21,10 +21,7 @@ function contains(container, containee) {
* workspaceReducer * workspaceReducer
*/ */
export const workspaceReducer = ( export const workspaceReducer = (
state = { // we'll need to abstract this more, methinks. state = settings.workspace,
draggingEnabled: true,
id: uuid(),
},
action, action,
) => { ) => {
let newWorkspaceDimensions; let newWorkspaceDimensions;
...@@ -91,6 +88,8 @@ export const workspaceReducer = ( ...@@ -91,6 +88,8 @@ export const workspaceReducer = (
case ActionTypes.TOGGLE_WORKSPACE_EXPOSE_MODE: case ActionTypes.TOGGLE_WORKSPACE_EXPOSE_MODE:
return { ...state, exposeModeOn: !state.exposeModeOn }; return { ...state, exposeModeOn: !state.exposeModeOn };
case ActionTypes.SET_CONFIG: case ActionTypes.SET_CONFIG:
case ActionTypes.IMPORT_CONFIG:
case ActionTypes.UPDATE_CONFIG:
return { ...state, ...action.config.workspace }; return { ...state, ...action.config.workspace };
case ActionTypes.IMPORT_MIRADOR_STATE: case ActionTypes.IMPORT_MIRADOR_STATE:
return action.state.workspace || {}; return action.state.workspace || {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment