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.
31 lines (26 loc) • 968 B
JavaScript
import { compose } from 'redux';
import { connect } from 'react-redux';
import { withPlugins } from '../extend/withPlugins';
import * as actions from '../state/actions';
import { getAllowedWindowViewTypes, getWindowViewType } from '../state/selectors';
import { WindowViewSettings } from '../components/WindowViewSettings';
/**
* mapDispatchToProps - used to hook up connect to action creators
* @memberof ManifestListItem
* @private
*/
const mapDispatchToProps = { setWindowViewType: actions.setWindowViewType };
/**
* mapStateToProps - to hook up connect
* @memberof WindowViewer
* @private
*/
const mapStateToProps = (state, { windowId }) => ({
viewTypes: getAllowedWindowViewTypes(state, { windowId }),
windowViewType: getWindowViewType(state, { windowId }),
});
const enhance = compose(
connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true }),
withPlugins('WindowViewSettings'),
);
export default enhance(WindowViewSettings);