Skip to content
Snippets Groups Projects
Commit 525f32fe authored by Alexander Rose's avatar Alexander Rose
Browse files

use elementLabel() for sequence widget dropdown

parent cdb698f0
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ import { HeteroSequenceWrapper } from './sequence/hetero'; ...@@ -20,6 +20,8 @@ import { HeteroSequenceWrapper } from './sequence/hetero';
import { State, StateSelection } from '../../mol-state'; import { State, StateSelection } from '../../mol-state';
import { ChainSequenceWrapper } from './sequence/chain'; import { ChainSequenceWrapper } from './sequence/chain';
import { ElementSequenceWrapper } from './sequence/element'; import { ElementSequenceWrapper } from './sequence/element';
import { elementLabel } from '../../mol-theme/label';
import { stripTags } from '../../mol-util/string';
const MaxDisplaySequenceLength = 5000 const MaxDisplaySequenceLength = 5000
...@@ -123,12 +125,7 @@ function getUnitOptions(structure: Structure, modelEntityId: string) { ...@@ -123,12 +125,7 @@ function getUnitOptions(structure: Structure, modelEntityId: string) {
// TODO handle special cases // TODO handle special cases
// - more than one chain in a unit // - more than one chain in a unit
// - chain spread over multiple units // - chain spread over multiple units
let label = '' let label = stripTags(elementLabel(l, 'chain', true))
if (Unit.isAtomic(unit)) {
label = `${SP.chain.label_asym_id(l)}: ${SP.chain.auth_asym_id(l)}`
} else {
label = `${SP.coarse.asym_id(l)}`
}
if (SP.entity.type(l) === 'water') { if (SP.entity.type(l) === 'water') {
const count = water.get(label) || 1 const count = water.get(label) || 1
water.set(label, count + 1) water.set(label, count + 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment