From 8f54ea137d6812ff6770987a69c44cc4af2aa3df Mon Sep 17 00:00:00 2001 From: Alexander Rose <alexander.rose@weirdbyte.de> Date: Tue, 12 May 2020 19:24:53 -0700 Subject: [PATCH] small tweaks --- src/extensions/rcsb/validation-report/behavior.ts | 6 +++--- src/mol-plugin-ui/structure/superposition.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extensions/rcsb/validation-report/behavior.ts b/src/extensions/rcsb/validation-report/behavior.ts index 6a44c2fb8..638dadbdf 100644 --- a/src/extensions/rcsb/validation-report/behavior.ts +++ b/src/extensions/rcsb/validation-report/behavior.ts @@ -322,14 +322,14 @@ export const ValidationReportGeometryQualityPreset = StructureRepresentationPres const clashes = await plugin.builders.structure.tryCreateComponentFromExpression(structureCell, hasClash.expression, 'clashes', { label: 'Clashes' }); const { update, builder, typeParams, color } = StructureRepresentationPresetProvider.reprBuilder(plugin, params); - let clashesBallAndStick, clashesSnfg3d; + let clashesBallAndStick, clashesRepr; if (representations) { clashesBallAndStick = builder.buildRepresentation(update, clashes, { type: 'ball-and-stick', typeParams, color: colorTheme }, { tag: 'clashes-ball-and-stick' }); - clashesSnfg3d = builder.buildRepresentation<any>(update, clashes, { type: ClashesRepresentationProvider.name, typeParams, color }, { tag: 'clashes-snfg-3d' }); + clashesRepr = builder.buildRepresentation<any>(update, clashes, { type: ClashesRepresentationProvider.name, typeParams, color }, { tag: 'clashes-repr' }); } await update.commit({ revertOnError: true }); - return { components: { ...components, clashes }, representations: { ...representations, clashesBallAndStick, clashesSnfg3d } }; + return { components: { ...components, clashes }, representations: { ...representations, clashesBallAndStick, clashesRepr } }; } }); diff --git a/src/mol-plugin-ui/structure/superposition.tsx b/src/mol-plugin-ui/structure/superposition.tsx index 07f175d0b..e3adc95a5 100644 --- a/src/mol-plugin-ui/structure/superposition.tsx +++ b/src/mol-plugin-ui/structure/superposition.tsx @@ -107,7 +107,7 @@ export class SuperpositionControls extends PurePluginUIComponent<{}, Superpositi } }; // TODO add .insertOrUpdate to StateBuilder? - let b = o + const b = o ? this.plugin.state.data.build().to(o).update(params) : this.plugin.state.data.build().to(s) .insert(StateTransforms.Model.TransformStructureConformation, params, { tags: SuperpositionTag }); -- GitLab