Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5521 - Sugar color is wrong if loaded from HELM with inline SMILES #5527

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading