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.
26 lines (22 loc) • 680 B
JavaScript
import { compose } from 'redux';
import { connect } from 'react-redux';
import { withPlugins } from '../extend/withPlugins';
import { GalleryView } from '../components/GalleryView';
import { getCanvases, getSequenceViewingDirection } from '../state/selectors';
/**
* mapStateToProps - to hook up connect
* @memberof WindowViewer
* @private
*/
const mapStateToProps = (state, { windowId }) => (
{
canvases: getCanvases(state, { windowId }),
viewingDirection: getSequenceViewingDirection(state, { windowId }),
}
);
const enhance = compose(
connect(mapStateToProps),
withPlugins('GalleryView'),
// further HOC go here
);
export default enhance(GalleryView);