Skip to content

Commit

Permalink
Added tabs option
Browse files Browse the repository at this point in the history
  • Loading branch information
midlik committed Aug 6, 2024
1 parent 37b6c23 commit a093f5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, following t
- Mol* core dependency updated to 4.5.0
- Solves the bug with Export Models
- PDBeMolstarPlugin.extensions.foldseek
- Added options `leftPanel`, `rightPanel`, `logPanel`
- Added options `leftPanel`, `rightPanel`, `logPanel`, `tabs`
- Option `hideCanvasControls` accepts "trajectory" value (for multi-model structures)
- All color options accept color names and hexcodes
- `visualStyle` option allows per-component specification
Expand Down
4 changes: 4 additions & 0 deletions src/app/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ export interface InitParams {
landscape: boolean,
/** Set reactive layout (switching between landscape and portrait based on the browser window size). Overrides `landscape`. */
reactive: boolean,
/** Specify which tabs should be included in the left control panel
* (pdbe = restricted selection of tabs used on PDBe pages, all = all available tabs) */
tabs: 'pdbe' | 'all',
}

/** Default values for `InitParams` */
Expand Down Expand Up @@ -246,6 +249,7 @@ export const DefaultParams: InitParams = {
expanded: false,
landscape: false,
reactive: false,
tabs: 'pdbe',
};

/** Return `undefined` if `params` are valid, an error message otherwise. */
Expand Down
4 changes: 2 additions & 2 deletions src/app/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import { initParamsFromHtmlAttributes } from './spec-from-html';
import { subscribeToComponentEvents } from './subscribe-events';
import { initSuperposition } from './superposition';
import { SuperpositionFocusRepresentation } from './superposition-focus-representation';
import { PDBeLeftPanelControls } from './ui/left-panel/pdbe-left-panel';
import { DefaultLeftPanelControls, PDBeLeftPanelControls } from './ui/left-panel/pdbe-left-panel';
import { PDBeLigandViewStructureTools, PDBeStructureTools, PDBeSuperpositionStructureTools } from './ui/pdbe-structure-controls';
import { PDBeViewport } from './ui/pdbe-viewport';
import { PDBeViewportControls } from './ui/pdbe-viewport-controls';
Expand Down Expand Up @@ -145,7 +145,7 @@ export class PDBeMolstarPlugin {

pdbePluginSpec.components = {
controls: {
left: PDBeLeftPanelControls,
left: this.initParams.tabs === 'pdbe' ? PDBeLeftPanelControls : DefaultLeftPanelControls,
},
viewport: {
controls: PDBeViewportControls,
Expand Down

0 comments on commit a093f5a

Please sign in to comment.