Skip to content
Snippets Groups Projects
Unverified Commit 67b1d04c authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Adds setting to remove ThumbnailNavigation from WindowTopMenu fixes #3312 (#3338)

parent 4fa96158
No related branches found
No related tags found
No related merge requests found
......@@ -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,
};
......@@ -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"
},
......
......@@ -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,
});
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment