mirador
Version:
An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
17 lines (13 loc) • 430 B
JavaScript
import settings from '../../config/settings';
/**
* Returns a slice of the mirador redux state based on settings.
* Otherwise the entire Redux state is returned.
* @param {object} state
* @returns {object}
*/
export function miradorSlice(state) {
if (settings.state.slice) return state[settings.state.slice];
return state;
}
export const EMPTY_ARRAY = Object.freeze([]);
export const EMPTY_OBJECT = Object.freeze({});