浏览代码

fix .getAllLoci for representations with structure.child

Alexander Rose 2 年之前
父节点
当前提交
18be09e9d5
共有 3 个文件被更改,包括 3 次插入2 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 1
      src/mol-repr/structure/complex-representation.ts
  3. 1 1
      src/mol-repr/structure/units-representation.ts

+ 1 - 0
CHANGELOG.md

@@ -14,6 +14,7 @@ Note that since we don't clearly distinguish between a public and private interf
 - Add "Zoom All", "Orient Axes", "Reset Axes" buttons to the "Reset Camera" button
 - Improve trackball move-state handling when key bindings use modifiers
 - Fix rendering with very small viewport and SSAO enabled
+- Fix `.getAllLoci` for structure representations with `structure.child`
 
 ## [v3.33.0] - 2023-04-02
 

+ 1 - 1
src/mol-repr/structure/complex-representation.ts

@@ -77,7 +77,7 @@ export function ComplexRepresentation<P extends StructureParams>(label: string,
     }
 
     function getAllLoci() {
-        return [Structure.Loci(_structure.target)];
+        return [Structure.Loci(_structure.child ?? _structure)];
     }
 
     function mark(loci: Loci, action: MarkerAction) {

+ 1 - 1
src/mol-repr/structure/units-representation.ts

@@ -195,7 +195,7 @@ export function UnitsRepresentation<P extends StructureParams>(label: string, ct
     }
 
     function getAllLoci() {
-        return [Structure.Loci(_structure.target)];
+        return [Structure.Loci(_structure.child ?? _structure)];
     }
 
     function mark(loci: Loci, action: MarkerAction) {