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.

32 lines (29 loc) 974 B
import { connect } from 'react-redux'; import { compose } from 'redux'; import { withTranslation } from 'react-i18next'; import { withPlugins } from '../extend/withPlugins'; import * as actions from '../state/actions'; import { getContainerId, getWindowIds, getWindowTitles } from '../state/selectors'; import { WindowList } from '../components/WindowList'; /** * mapDispatchToProps - used to hook up connect to action creators * @memberof ManifestListItem * @private */ var mapDispatchToProps = { focusWindow: actions.focusWindow }; /** * mapStateToProps - to hook up connect * @memberof WorkspaceControlPanel * @private */ var mapStateToProps = function mapStateToProps(state) { return { containerId: getContainerId(state), titles: getWindowTitles(state), windowIds: getWindowIds(state) }; }; var enhance = compose(withTranslation(), connect(mapStateToProps, mapDispatchToProps), withPlugins('WindowList')); export default enhance(WindowList);