Skip to content

Commit

Permalink
#5521 - Sugar color is wrong if loaded from HELM with inline SMILES
Browse files Browse the repository at this point in the history
  • Loading branch information
rrodionov91 committed Sep 18, 2024
1 parent dd00d41 commit 146d76c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Phosphate } from 'domain/entities/Phosphate';
import { BaseMonomerRenderer } from 'application/render/renderers/BaseMonomerRenderer';
import { MONOMER_SYMBOLS_IDS } from 'application/render/renderers/constants';
import { KetMonomerClass } from 'application/formatters';
import { RNA_DNA_NON_MODIFIED_PART } from 'domain/constants/monomers';

const PHOSPHATE_SELECTED_ELEMENT_ID =
MONOMER_SYMBOLS_IDS[KetMonomerClass.Phosphate].selected;
Expand All @@ -20,6 +21,10 @@ export class PhosphateRenderer extends BaseMonomerRenderer {
);
}

protected getMonomerColor(theme) {
return theme.monomer.color[RNA_DNA_NON_MODIFIED_PART.PHOSPHATE].regular;
}

protected appendBody(
rootElement: Selection<SVGGElement, void, HTMLElement, never>,
theme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Sugar } from 'domain/entities/Sugar';
import { BaseMonomerRenderer } from 'application/render/renderers/BaseMonomerRenderer';
import { MONOMER_SYMBOLS_IDS } from 'application/render/renderers/constants';
import { KetMonomerClass } from 'application/formatters';
import { RNA_DNA_NON_MODIFIED_PART } from 'domain/constants/monomers';

const SUGAR_SELECTED_ELEMENT_ID =
MONOMER_SYMBOLS_IDS[KetMonomerClass.Sugar].selected;
Expand All @@ -21,6 +22,14 @@ export class SugarRenderer extends BaseMonomerRenderer {
);
}

public get textColor() {
return '#fff';
}

protected getMonomerColor(theme) {
return theme.monomer.color[RNA_DNA_NON_MODIFIED_PART.SUGAR_RNA].regular;
}

protected appendBody(
rootElement: Selection<SVGGElement, void, HTMLElement, never>,
theme,
Expand Down

0 comments on commit 146d76c

Please sign in to comment.