Explorar o código

fixed link fromGroup location-iterator to use instance

Alexander Rose %!s(int64=6) %!d(string=hai) anos
pai
achega
d5388cf902
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      src/mol-geo/representation/structure/visual/util/link.ts

+ 4 - 2
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
         }