Skip to content
Snippets Groups Projects
Commit 31bcc5a0 authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: fix assembly transform, UI wip

parent fc3d1924
No related branches found
No related tags found
No related merge requests found
...@@ -44,11 +44,12 @@ ...@@ -44,11 +44,12 @@
.msp-transform-header { .msp-transform-header {
position: relative; position: relative;
border-top: 1px solid $entity-color-Behaviour; // TODO: separate color // border-top: 1px solid $entity-color-Behaviour; // TODO: separate color
> button { > button {
text-align: left; text-align: left;
background: color-lower-contrast($default-background, 4%); padding-left: $row-height;
background: $control-background; // color-lower-contrast($default-background, 4%);
font-weight: bold; font-weight: bold;
} }
......
...@@ -168,7 +168,6 @@ const StructureAssemblyFromModel = PluginStateTransform.BuiltIn({ ...@@ -168,7 +168,6 @@ const StructureAssemblyFromModel = PluginStateTransform.BuiltIn({
return new SO.Molecule.Structure(base, label); return new SO.Molecule.Structure(base, label);
} }
asm = model.symmetry.assemblies[0];
id = asm.id; id = asm.id;
const s = await StructureSymmetry.buildAssembly(base, id!).runInContext(ctx); const s = await StructureSymmetry.buildAssembly(base, id!).runInContext(ctx);
const props = { label: `Assembly ${id}`, description: structureDesc(s) }; const props = { label: `Assembly ${id}`, description: structureDesc(s) };
......
...@@ -177,7 +177,7 @@ abstract class TransformContolBase<P, S extends TransformContolBase.ControlState ...@@ -177,7 +177,7 @@ abstract class TransformContolBase<P, S extends TransformContolBase.ControlState
return <div className='msp-transform-wrapper'> return <div className='msp-transform-wrapper'>
<div className='msp-transform-header'> <div className='msp-transform-header'>
<button className='msp-btn msp-btn-block' onClick={this.toggleExpanded}>{display.name}</button> <button className='msp-btn msp-btn-block' onClick={this.toggleExpanded} title={display.description}>{display.name}</button>
{!isEmpty && !this.state.isCollapsed && <button className='msp-btn msp-btn-link msp-transform-default-params' onClick={this.setDefault} disabled={this.state.busy} style={{ float: 'right'}} title='Set default params'></button>} {!isEmpty && !this.state.isCollapsed && <button className='msp-btn msp-btn-link msp-transform-default-params' onClick={this.setDefault} disabled={this.state.busy} style={{ float: 'right'}} title='Set default params'></button>}
</div> </div>
{!isEmpty && !this.state.isCollapsed && <> {!isEmpty && !this.state.isCollapsed && <>
......
...@@ -222,7 +222,7 @@ class StateTreeNodeLabel extends PluginUIComponent<{ nodeRef: string, state: Sta ...@@ -222,7 +222,7 @@ class StateTreeNodeLabel extends PluginUIComponent<{ nodeRef: string, state: Sta
const row = <div className={`msp-tree-row${isCurrent ? ' msp-tree-row-current' : ''}`} onMouseEnter={this.highlight} onMouseLeave={this.clearHighlight} const row = <div className={`msp-tree-row${isCurrent ? ' msp-tree-row-current' : ''}`} onMouseEnter={this.highlight} onMouseLeave={this.clearHighlight}
style={{ marginLeft: this.state.isCurrent ? '0px' : `${this.props.depth * 10}px`, borderRadius: this.state.isCurrent ? '0' : void 0 }}> style={{ marginLeft: this.state.isCurrent ? '0px' : `${this.props.depth * 10}px`, borderRadius: this.state.isCurrent ? '0' : void 0 }}>
{isCurrent ? <b>{label}</b> : label} {label}
{children.size > 0 && <button onClick={this.toggleExpanded} className='msp-btn msp-btn-link msp-tree-toggle-exp-button'> {children.size > 0 && <button onClick={this.toggleExpanded} className='msp-btn msp-btn-link msp-tree-toggle-exp-button'>
<span className={`msp-icon msp-icon-${cellState.isCollapsed ? 'expand' : 'collapse'}`} /> <span className={`msp-icon msp-icon-${cellState.isCollapsed ? 'expand' : 'collapse'}`} />
</button>} </button>}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment