Browse Source

hide reprLabel in StructureComponentGroup

David Sehnal 5 years ago
parent
commit
c80658f368
1 changed files with 11 additions and 10 deletions
  1. 11 10
      src/mol-plugin-ui/structure/components.tsx

+ 11 - 10
src/mol-plugin-ui/structure/components.tsx

@@ -320,23 +320,24 @@ class StructureComponentGroup extends PurePluginUIComponent<{ group: StructureCo
         });
     }
 
-    get reprLabel() {
-        // TODO: handle generic reprs.
-        const pivot = this.pivot;
-        if (pivot.representations.length === 0) return 'No repr.';
-        if (pivot.representations.length === 1) return pivot.representations[0].cell.obj?.label;
-        return `${pivot.representations.length} reprs`;
-    }
+    // get reprLabel() {
+    //     // TODO: handle generic reprs.
+    //     const pivot = this.pivot;
+    //     if (pivot.representations.length === 0) return 'No repr.';
+    //     if (pivot.representations.length === 1) return pivot.representations[0].cell.obj?.label;
+    //     return `${pivot.representations.length} reprs`;
+    // }
 
     render() {
         const component = this.pivot;
         const cell = component.cell;
         const label = cell.obj?.label;
-        const reprLabel = this.reprLabel;
+        // const reprLabel = this.reprLabel;
         return <>
             <div className='msp-btn-row-group'>
-                <button className='msp-form-control msp-control-button-label msp-no-overflow' title={`${label}, ${reprLabel}. Click to focus.`} onClick={this.focus} onMouseEnter={this.highlight} onMouseLeave={this.clearHighlight} style={{ textAlign: 'left' }}>
-                    {label} <small className='msp-25-lower-contrast-text' style={{ float: 'right' }}>{reprLabel}</small>
+                <button className='msp-form-control msp-control-button-label msp-no-overflow' title={`${label}. Click to focus.`} onClick={this.focus} onMouseEnter={this.highlight} onMouseLeave={this.clearHighlight} style={{ textAlign: 'left' }}>
+                    {label}
+                    {/* <small className='msp-25-lower-contrast-text' style={{ float: 'right' }}>{reprLabel}</small> */}
                 </button>
                 <IconButton onClick={this.toggleVisible} icon='visual-visibility' toggleState={!cell.state.isHidden} title={`${cell.state.isHidden ? 'Show' : 'Hide'} component`} small customClass='msp-form-control' style={{ flex: '0 0 32px' }} />
                 <IconButton onClick={this.toggleRemove} icon='remove' title='Remove' small toggleState={this.state.action === 'remove'} customClass='msp-form-control' style={{ flex: '0 0 32px' }} />