From 19bfc353ecc258bd7ce506d63b8992216915b0fc Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Thu, 30 Aug 2018 18:01:05 -0700 Subject: [PATCH] fixed StructureElementIterator.fromGroup to pick unit corresponding to instance --- .../representation/structure/visual/util/element.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mol-geo/representation/structure/visual/util/element.ts b/src/mol-geo/representation/structure/visual/util/element.ts index d469d6f2f..704b0632e 100644 --- a/src/mol-geo/representation/structure/visual/util/element.ts +++ b/src/mol-geo/representation/structure/visual/util/element.ts @@ -87,11 +87,12 @@ export function getElementLoci(pickingId: PickingId, group: Unit.SymmetryGroup, export namespace StructureElementIterator { export function fromGroup(group: Unit.SymmetryGroup): LocationIterator { - const unit = group.units[0] const groupCount = group.elements.length const instanceCount = group.units.length - const location = StructureElement.create(unit) - const getLocation = (groupIndex: number) => { + const location = StructureElement.create() + const getLocation = (groupIndex: number, instanceIndex: number) => { + const unit = group.units[instanceIndex] + location.unit = unit location.element = unit.elements[groupIndex] return location } -- GitLab