Pārlūkot izejas kodu

fix missing aromatic bond display

- simplify code to always show when aromatic
Alexander Rose 2 gadi atpakaļ
vecāks
revīzija
318863bd18

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@ Note that since we don't clearly distinguish between a public and private interf
 
 - Fix missing ``super.componentWillUnmount()`` calls (@simeonborko)
 - Fix missing ``uGroupCount`` update for visuals
+- Fix missing aromatic bond display
 
 ## [v3.9.0] - 2022-05-30
 

+ 1 - 3
src/mol-repr/structure/visual/bond-intra-unit-cylinder.ts

@@ -149,10 +149,8 @@ function getIntraUnitBondCylinderBuilderProps(unit: Unit.Atomic, structure: Stru
                 if (isBondType(f, BondType.Flag.Aromatic) || (arCount && !ignoreComputedAromatic)) {
                     if (arCount === 2) {
                         return LinkStyle.MirroredAromatic;
-                    } else if (arCount === 1 || deloTriplets?.getThirdElement(aI, bI)) {
-                        return LinkStyle.Aromatic;
                     } else {
-                        // case for bonds between two aromatic rings
+                        return LinkStyle.Aromatic;
                     }
                 }
             }

+ 1 - 3
src/mol-repr/structure/visual/bond-intra-unit-line.ts

@@ -110,10 +110,8 @@ function createIntraUnitBondLines(ctx: VisualContext, unit: Unit, structure: Str
                 if (isBondType(f, BondType.Flag.Aromatic) || (arCount && !ignoreComputedAromatic)) {
                     if (arCount === 2) {
                         return LinkStyle.MirroredAromatic;
-                    } else if (arCount === 1 || deloTriplets?.getThirdElement(aI, bI)) {
-                        return LinkStyle.Aromatic;
                     } else {
-                        // case for bonds between two aromatic rings
+                        return LinkStyle.Aromatic;
                     }
                 }
             }