From d5388cf9020a447266e34f7332833fbf29532415 Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Tue, 4 Sep 2018 15:07:31 -0700 Subject: [PATCH] fixed link fromGroup location-iterator to use instance --- src/mol-geo/representation/structure/visual/util/link.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mol-geo/representation/structure/visual/util/link.ts b/src/mol-geo/representation/structure/visual/util/link.ts index 3978bfc9a..ca73e55b9 100644 --- a/src/mol-geo/representation/structure/visual/util/link.ts +++ b/src/mol-geo/representation/structure/visual/util/link.ts @@ -126,8 +126,10 @@ export namespace LinkIterator { const unit = group.units[0] const groupCount = Unit.isAtomic(unit) ? unit.links.edgeCount * 2 : 0 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[(unit as Unit.Atomic).links.a[groupIndex]] return location } -- GitLab