Selaa lähdekoodia

fix .getAllLoci for representations with structure.child

Alexander Rose 2 vuotta sitten
vanhempi
commit
18be09e9d5

+ 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) {