UNPKG

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.

29 lines (24 loc) 900 B
import { compose } from 'redux'; import { connect } from 'react-redux'; import { withPlugins } from '../extend/withPlugins'; import * as actions from '../state/actions'; import { MinimalWindow } from '../components/MinimalWindow'; import { getWindowConfig } from '../state/selectors'; /** mapStateToProps */ const mapStateToProps = (state, { windowId }) => ({ allowClose: getWindowConfig(state, { windowId }).allowClose, allowWindowSideBar: getWindowConfig(state, { windowId }).allowWindowSideBar, }); /** * mapDispatchToProps - used to hook up connect to action creators * @memberof ManifestListItem * @private */ const mapDispatchToProps = (dispatch, { windowId }) => ({ removeWindow: () => dispatch(actions.removeWindow(windowId)), }); const enhance = compose( connect(mapStateToProps, mapDispatchToProps), withPlugins('MinimalWindow'), ); export default enhance(MinimalWindow);