From cfaecb590d7868a1ddb1c4635ff758937c1b7e86 Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Thu, 31 Oct 2019 18:54:15 -0700 Subject: [PATCH] fix StructureRepresentationInteractionBehavior bundle handling --- .../selection/structure-representation-interaction.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts b/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts index 58e46320e..b26cab5f0 100644 --- a/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts +++ b/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts @@ -102,13 +102,14 @@ export class StructureRepresentationInteractionBehavior extends PluginBehavior.W if (groups.length === 0) return; const update = state.build(); + const bundle = StructureElement.Bundle.Empty; const expression = MS.struct.generator.empty(); for (const g of groups) { // TODO: update props of the group node to ghost const res = StateSelection.findTagInSubtree(state.tree, g.transform.ref, Tags.ResidueSel); const surr = StateSelection.findTagInSubtree(state.tree, g.transform.ref, Tags.SurrSel); - if (res) update.to(res).update(StateTransforms.Model.StructureSelectionFromExpression, old => ({ ...old, expression })); + if (res) update.to(res).update(StateTransforms.Model.StructureSelectionFromBundle, old => ({ ...old, bundle })); if (surr) update.to(surr).update(StateTransforms.Model.StructureSelectionFromExpression, old => ({ ...old, expression })); } @@ -166,7 +167,7 @@ export class StructureRepresentationInteractionBehavior extends PluginBehavior.W lastLoci = loci; - const residueLoci = StructureElement.Loci.extendToWholeResidues(loci) + const residueLoci = StructureElement.Loci.extendToWholeResidues(StructureElement.Loci.remap(loci, parent.obj!.data)) const residueBundle = StructureElement.Bundle.fromLoci(residueLoci) const surroundings = MS.struct.modifier.includeSurroundings({ -- GitLab