diff --git a/src/apps/viewer/index.ts b/src/apps/viewer/index.ts index c1fa480ab6b3783a36841d08dd3e995916b22b5e..84df412221582aec3c3b6b0bf70f6313ea406c3d 100644 --- a/src/apps/viewer/index.ts +++ b/src/apps/viewer/index.ts @@ -52,6 +52,8 @@ const DefaultViewerOptions = { layoutShowLeftPanel: true, viewportShowExpand: PluginConfig.Viewport.ShowExpand.defaultValue, + viewportShowControls: PluginConfig.Viewport.ShowControls.defaultValue, + viewportShowSettings: PluginConfig.Viewport.ShowSettings.defaultValue, viewportShowSelectionMode: PluginConfig.Viewport.ShowSelectionMode.defaultValue, viewportShowAnimation: PluginConfig.Viewport.ShowAnimation.defaultValue, pluginStateServer: PluginConfig.State.DefaultServer.defaultValue, @@ -94,6 +96,8 @@ export class Viewer { }, config: [ [PluginConfig.Viewport.ShowExpand, o.viewportShowExpand], + [PluginConfig.Viewport.ShowControls, o.viewportShowControls], + [PluginConfig.Viewport.ShowSettings, o.viewportShowSettings], [PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode], [PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation], [PluginConfig.State.DefaultServer, o.pluginStateServer], diff --git a/src/mol-plugin-ui/viewport.tsx b/src/mol-plugin-ui/viewport.tsx index 4080c3fd832fe8313b27d25220f3422caf0d357b..8f4150912c06c297077c16e7f6dcedfb201d604e 100644 --- a/src/mol-plugin-ui/viewport.tsx +++ b/src/mol-plugin-ui/viewport.tsx @@ -96,9 +96,9 @@ export class ViewportControls extends PluginUIComponent<ViewportControlsProps, V </div> <div> <div className='msp-semi-transparent-background' /> - {this.icon(BuildOutlinedSvg, this.toggleControls, 'Toggle Controls Panel', this.plugin.layout.state.showControls)} + {this.plugin.config.get(PluginConfig.Viewport.ShowControls) && this.icon(BuildOutlinedSvg, this.toggleControls, 'Toggle Controls Panel', this.plugin.layout.state.showControls)} {this.plugin.config.get(PluginConfig.Viewport.ShowExpand) && this.icon(FullscreenSvg, this.toggleExpanded, 'Toggle Expanded Viewport', this.plugin.layout.state.isExpanded)} - {this.icon(TuneSvg, this.toggleSettingsExpanded, 'Settings / Controls Info', this.state.isSettingsExpanded)} + {this.plugin.config.get(PluginConfig.Viewport.ShowSettings) && this.icon(TuneSvg, this.toggleSettingsExpanded, 'Settings / Controls Info', this.state.isSettingsExpanded)} </div> {this.plugin.config.get(PluginConfig.Viewport.ShowSelectionMode) && <div> <div className='msp-semi-transparent-background' /> diff --git a/src/mol-plugin/config.ts b/src/mol-plugin/config.ts index 23eb3d110f2ddb9428afbf637b2336bc8e19cb8b..223d934bde6120e3984c9d948f6ffa308ef30b45 100644 --- a/src/mol-plugin/config.ts +++ b/src/mol-plugin/config.ts @@ -37,6 +37,8 @@ export const PluginConfig = { }, Viewport: { ShowExpand: item('viewer.show-expand-button', true), + ShowControls: item('viewer.show-controls-button', true), + ShowSettings: item('viewer.show-settings-button', true), ShowSelectionMode: item('viewer.show-selection-model-button', true), ShowAnimation: item('viewer.show-animation-button', true), },