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.

58 lines (53 loc) 1.55 kB
import { compose } from 'redux'; import { connect } from 'react-redux'; import { withTranslation } from 'react-i18next'; import { withStyles } from '@material-ui/core/styles'; 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 */ var mapDispatchToProps = { setWindowViewType: actions.setWindowViewType }; /** * mapStateToProps - to hook up connect * @memberof WindowViewer * @private */ var mapStateToProps = function mapStateToProps(state, _ref) { var windowId = _ref.windowId; return { viewTypes: getAllowedWindowViewTypes(state, { windowId: windowId }), windowViewType: getWindowViewType(state, { windowId: windowId }) }; }; /** */ var styles = function styles(theme) { return { label: { borderBottom: '2px solid transparent' }, MenuItem: { display: 'inline-block' }, selectedLabel: { borderBottom: "2px solid ".concat(theme.palette.secondary.main), color: theme.palette.secondary.main } }; }; var enhance = compose(withStyles(styles), withTranslation(null, { withRef: true }), connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true }), withPlugins('WindowViewSettings')); export default enhance(WindowViewSettings);