Browse Source

ui tweaks

David Sehnal 5 years ago
parent
commit
5e6bc0f0df

+ 1 - 1
src/mol-plugin-state/manager/structure/hierarchy.ts

@@ -131,7 +131,7 @@ export class StructureHierarchyManager extends PluginComponent<StructureHierarch
         if (refs.length === 0) return;
         const deletes = this.plugin.state.dataState.build();
         for (const r of refs) deletes.delete(r.cell.transform.ref);
-        return this.plugin.runTask(this.plugin.state.dataState.updateTree(deletes, { canUndo }));
+        return this.plugin.runTask(this.plugin.state.dataState.updateTree(deletes, { canUndo: canUndo ? 'Remove' : false }));
     }
 
     createAllModels(trajectory: TrajectoryRef) {

+ 3 - 3
src/mol-plugin-ui/structure/components.tsx

@@ -213,7 +213,7 @@ class CurrentFocus extends PluginUIComponent {
     render() {
         const interaction = this.findInteraction();
         if (!interaction) return null;
-        return <ExpandGroup header='Current Focus' marginTop={0} noOffset>
+        return <ExpandGroup header='Current Focus' noOffset>
             {interaction.focus && <StructureComponentGroup group={[interaction.focus]} />}
             {interaction.surroundings && <StructureComponentGroup group={[interaction.surroundings]} />}
         </ExpandGroup>;
@@ -332,7 +332,7 @@ class StructureComponentGroup extends PurePluginUIComponent<{ group: StructureCo
         const component = this.pivot;
         const cell = component.cell;
         const label = cell.obj?.label;
-        return <div style={{ marginBottom: '6px' }}>
+        return <>
             <div className='msp-control-row'>
                 <button className='msp-control-button-label' title={`${label}. Click to focus.`} onClick={this.focus} onMouseEnter={this.highlight} onMouseLeave={this.clearHighlight} style={{ textAlign: 'left' }}>
                     {label}
@@ -350,7 +350,7 @@ class StructureComponentGroup extends PurePluginUIComponent<{ group: StructureCo
                     {component.representations.map(r => <StructureRepresentationEntry group={this.props.group} key={r.cell.transform.ref} representation={r} />)}
                 </div>
             </>}
-        </div>;
+        </>;
     }
 }