Browse Source

fix StructureElementSelectionManager.getPrincipalAxes for multiple entries

Alexander Rose 5 years ago
parent
commit
a13c98c36c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-plugin/util/structure-element-selection.ts

+ 1 - 1
src/mol-plugin/util/structure-element-selection.ts

@@ -83,7 +83,7 @@ class StructureElementSelectionManager {
         let offset = 0
         this.entries.forEach(v => {
             StructureElement.Loci.toPositionsArray(v.selection, positions, offset)
-            offset += StructureElement.Loci.size(v.selection)
+            offset += StructureElement.Loci.size(v.selection) * 3
         })
         return PrincipalAxes.ofPoints(Matrix.fromArray(positions, 3, elementCount))
     }