diff --git a/src/mol-plugin/ui/controls/parameters.tsx b/src/mol-plugin/ui/controls/parameters.tsx index b94b0cf2c781a0ebf836a1ba6d4bd52de507b07c..ad5116ba188376a185411a9c8a39795260d75ae9 100644 --- a/src/mol-plugin/ui/controls/parameters.tsx +++ b/src/mol-plugin/ui/controls/parameters.tsx @@ -247,12 +247,13 @@ export class MultiSelectControl extends React.PureComponent<ParamProps<PD.MultiS </div> </div> <div className='msp-control-offset' style={{ display: this.state.isExpanded ? 'block' : 'none' }}> - {this.props.param.options.map(([value, label]) => - <div key={value} className='msp-row'> + {this.props.param.options.map(([value, label]) => { + const sel = current.indexOf(value) >= 0; + return <div key={value} className='msp-row'> <button onClick={this.toggle(value)} disabled={this.props.isDisabled}> - {current.indexOf(value) >= 0 ? `✓ ${label}` : `✗ ${label}`} + <span style={{ float: sel ? 'left' : 'right' }}>{sel ? `✓ ${label}` : `${label} ✗`}</span> </button> - </div>)} + </div> })} </div> </>; }