Browse Source

fix parentDisplay 'between' logic

Alexander Rose 2 years ago
parent
commit
f2f730bab5

+ 1 - 1
src/apps/docking-viewer/index.ts

@@ -166,7 +166,7 @@ class Viewer {
             structures.push({ ref: structureProperties?.ref || structure.ref });
         }
 
-        // remove current structuresfrom hierarchy as they will be merged
+        // remove current structures from hierarchy as they will be merged
         // TODO only works with using loadStructuresFromUrlsAndMerge once
         //      need some more API metho to work with the hierarchy
         this.plugin.managers.structure.hierarchy.updateCurrent(this.plugin.managers.structure.hierarchy.current.structures, 'remove');

+ 1 - 1
src/mol-model-props/computed/representations/interactions-inter-unit-cylinder.ts

@@ -111,7 +111,7 @@ function createInterUnitInteractionCylinderMesh(ctx: VisualContext, structure: S
                         }
                     }
 
-                    return parentDisplay === 'full' ? flagA && flagB : flagA !== flagB;
+                    return parentDisplay === 'full' ? flagA && flagB : flagA === flagB;
                 } else {
                     assertUnreachable(parentDisplay);
                 }

+ 4 - 4
src/mol-model-props/computed/representations/interactions-intra-unit-cylinder.ts

@@ -64,7 +64,7 @@ async function createIntraUnitInteractionsCylinderMesh(ctx: VisualContext, unit:
             if (childUnit) {
                 if (parentDisplay === 'stub') {
                     const f = a[edgeIndex];
-                    for (let i = offsets[f], jl = offsets[f + 1]; i < jl; ++i) {
+                    for (let i = offsets[f], il = offsets[f + 1]; i < il; ++i) {
                         const e = unit.elements[members[offsets[i]]];
                         if (!SortedArray.has(childUnit.elements, e)) return true;
                     }
@@ -73,18 +73,18 @@ async function createIntraUnitInteractionsCylinderMesh(ctx: VisualContext, unit:
                     let flagB = false;
 
                     const fA = a[edgeIndex];
-                    for (let i = offsets[fA], jl = offsets[fA + 1]; i < jl; ++i) {
+                    for (let i = offsets[fA], il = offsets[fA + 1]; i < il; ++i) {
                         const eA = unit.elements[members[offsets[i]]];
                         if (!SortedArray.has(childUnit.elements, eA)) flagA = true;
                     }
 
                     const fB = b[edgeIndex];
-                    for (let i = offsets[fB], jl = offsets[fB + 1]; i < jl; ++i) {
+                    for (let i = offsets[fB], il = offsets[fB + 1]; i < il; ++i) {
                         const eB = unit.elements[members[offsets[i]]];
                         if (!SortedArray.has(childUnit.elements, eB)) flagB = true;
                     }
 
-                    return parentDisplay === 'full' ? flagA && flagB : flagA !== flagB;
+                    return parentDisplay === 'full' ? flagA && flagB : flagA === flagB;
                 } else {
                     assertUnreachable(parentDisplay);
                 }