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
Branches
Tags
No related merge requests found
...@@ -27,7 +27,8 @@ export class WindowTopMenu extends Component { ...@@ -27,7 +27,8 @@ export class WindowTopMenu extends Component {
*/ */
render() { render() {
const { const {
containerId, handleClose, anchorEl, toggleDraggingEnabled, windowId, containerId, handleClose, anchorEl, showThumbnailNavigationSettings,
toggleDraggingEnabled, windowId,
} = this.props; } = this.props;
return ( return (
...@@ -51,7 +52,8 @@ export class WindowTopMenu extends Component { ...@@ -51,7 +52,8 @@ export class WindowTopMenu extends Component {
orientation="horizontal" orientation="horizontal"
> >
<WindowViewSettings windowId={windowId} handleClose={handleClose} /> <WindowViewSettings windowId={windowId} handleClose={handleClose} />
<WindowThumbnailSettings windowId={windowId} handleClose={handleClose} /> {showThumbnailNavigationSettings
&& <WindowThumbnailSettings windowId={windowId} handleClose={handleClose} />}
<PluginHookWithHeader {...this.props} /> <PluginHookWithHeader {...this.props} />
</Menu> </Menu>
); );
...@@ -62,10 +64,12 @@ WindowTopMenu.propTypes = { ...@@ -62,10 +64,12 @@ WindowTopMenu.propTypes = {
anchorEl: PropTypes.object, // eslint-disable-line react/forbid-prop-types anchorEl: PropTypes.object, // eslint-disable-line react/forbid-prop-types
containerId: PropTypes.string.isRequired, containerId: PropTypes.string.isRequired,
handleClose: PropTypes.func.isRequired, handleClose: PropTypes.func.isRequired,
showThumbnailNavigationSettings: PropTypes.bool,
toggleDraggingEnabled: PropTypes.func.isRequired, toggleDraggingEnabled: PropTypes.func.isRequired,
windowId: PropTypes.string.isRequired, windowId: PropTypes.string.isRequired,
}; };
WindowTopMenu.defaultProps = { WindowTopMenu.defaultProps = {
anchorEl: null, anchorEl: null,
showThumbnailNavigationSettings: true,
}; };
...@@ -297,6 +297,7 @@ export default { ...@@ -297,6 +297,7 @@ export default {
], ],
thumbnailNavigation: { thumbnailNavigation: {
defaultPosition: 'off', // Which position for the thumbnail navigation to be be displayed. Other possible values are "far-bottom" or "far-right" 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" 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" 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'; ...@@ -4,7 +4,7 @@ import { withTranslation } from 'react-i18next';
import { withPlugins } from '../extend/withPlugins'; import { withPlugins } from '../extend/withPlugins';
import * as actions from '../state/actions'; import * as actions from '../state/actions';
import { WindowTopMenu } from '../components/WindowTopMenu'; import { WindowTopMenu } from '../components/WindowTopMenu';
import { getContainerId } from '../state/selectors'; import { getConfig, getContainerId } from '../state/selectors';
/** /**
* mapStateToProps - to hook up connect * mapStateToProps - to hook up connect
...@@ -13,6 +13,7 @@ import { getContainerId } from '../state/selectors'; ...@@ -13,6 +13,7 @@ import { getContainerId } from '../state/selectors';
*/ */
const mapStateToProps = state => ({ const mapStateToProps = state => ({
containerId: getContainerId(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