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.
21 lines (17 loc) • 700 B
JavaScript
import { connect } from 'react-redux';
import { compose } from 'redux';
import { withPlugins } from '../extend/withPlugins';
import { WindowSideBar } from '../components/WindowSideBar';
import { getThemeDirection, getWindow } from '../state/selectors';
/**
* mapStateToProps - to hook up connect
* @memberof WindowSideBar
* @private
*/
const mapStateToProps = (state, { windowId }) => ({
direction: getThemeDirection(state),
sideBarOpen: (getWindow(state, { windowId }) || {}).sideBarOpen,
sideBarPanel: (getWindow(state, { windowId }) || {}).sideBarPanel,
});
const enhance = compose(connect(mapStateToProps, null), withPlugins('WindowSideBar'));
export default enhance(WindowSideBar);