diff --git a/src/components/WindowTopMenu.js b/src/components/WindowTopMenu.js index 502346cbe9d88946dab41c2074a6e44c9626f88f..7998753826b5a94a65e7468e6ecc946581e7ec66 100644 --- a/src/components/WindowTopMenu.js +++ b/src/components/WindowTopMenu.js @@ -27,7 +27,8 @@ export class WindowTopMenu extends Component { */ render() { const { - containerId, handleClose, anchorEl, toggleDraggingEnabled, windowId, + containerId, handleClose, anchorEl, showThumbnailNavigationSettings, + toggleDraggingEnabled, windowId, } = this.props; return ( @@ -51,7 +52,8 @@ export class WindowTopMenu extends Component { orientation="horizontal" > <WindowViewSettings windowId={windowId} handleClose={handleClose} /> - <WindowThumbnailSettings windowId={windowId} handleClose={handleClose} /> + {showThumbnailNavigationSettings + && <WindowThumbnailSettings windowId={windowId} handleClose={handleClose} />} <PluginHookWithHeader {...this.props} /> </Menu> ); @@ -62,10 +64,12 @@ WindowTopMenu.propTypes = { anchorEl: PropTypes.object, // eslint-disable-line react/forbid-prop-types containerId: PropTypes.string.isRequired, handleClose: PropTypes.func.isRequired, + showThumbnailNavigationSettings: PropTypes.bool, toggleDraggingEnabled: PropTypes.func.isRequired, windowId: PropTypes.string.isRequired, }; WindowTopMenu.defaultProps = { anchorEl: null, + showThumbnailNavigationSettings: true, }; diff --git a/src/config/settings.js b/src/config/settings.js index 1a72af0199fc342d57d7de7b8f77e98eb06a21b0..414de473472616592b29ea6610e8c86200c010e7 100644 --- a/src/config/settings.js +++ b/src/config/settings.js @@ -297,6 +297,7 @@ export default { ], thumbnailNavigation: { defaultPosition: 'off', // Which position for the thumbnail navigation to be be displayed. Other possible values are "far-bottom" or "far-right" + displaySettings: true, // Display the settings for this in WindowTopMenu height: 130, // height of entire ThumbnailNavigation area when position is "far-bottom" width: 100, // width of one canvas (doubled for book view) in ThumbnailNavigation area when position is "far-right" }, diff --git a/src/containers/WindowTopMenu.js b/src/containers/WindowTopMenu.js index 7fcf1d64405f1434e99a124298b19883d76331ce..f042c1f732015023d7a5055be3209b2a6403c418 100644 --- a/src/containers/WindowTopMenu.js +++ b/src/containers/WindowTopMenu.js @@ -4,7 +4,7 @@ import { withTranslation } from 'react-i18next'; import { withPlugins } from '../extend/withPlugins'; import * as actions from '../state/actions'; import { WindowTopMenu } from '../components/WindowTopMenu'; -import { getContainerId } from '../state/selectors'; +import { getConfig, getContainerId } from '../state/selectors'; /** * mapStateToProps - to hook up connect @@ -13,6 +13,7 @@ import { getContainerId } from '../state/selectors'; */ const mapStateToProps = state => ({ containerId: getContainerId(state), + showThumbnailNavigationSettings: getConfig(state).thumbnailNavigation.displaySettings, }); /**