diff --git a/packages/ketcher-core/src/application/render/renderers/sequence/NucleotideSequenceItemRenderer.ts b/packages/ketcher-core/src/application/render/renderers/sequence/NucleotideSequenceItemRenderer.ts index e482d50ec5..c4e548fbaa 100644 --- a/packages/ketcher-core/src/application/render/renderers/sequence/NucleotideSequenceItemRenderer.ts +++ b/packages/ketcher-core/src/application/render/renderers/sequence/NucleotideSequenceItemRenderer.ts @@ -56,5 +56,20 @@ export class NucleotideSequenceItemRenderer extends BaseSequenceItemRenderer { .attr('cx', '10') .attr('cy', '-16'); } + + // show modification for not last Nucleoside + if (!node.phosphate) { + this.phosphateModificationCircleElement = this.rootElement + ?.append('circle') + .attr('r', '3px') + .attr( + 'stroke', + this.isSequenceEditInRnaBuilderModeTurnedOn ? '#24545A' : '#585858', + ) + .attr('stroke-width', '1px') + .attr('fill', 'none') + .attr('cx', '10') + .attr('cy', '-16'); + } } } diff --git a/packages/ketcher-core/src/domain/entities/Nucleoside.ts b/packages/ketcher-core/src/domain/entities/Nucleoside.ts index bf7bc2a189..d2abf4e72d 100644 --- a/packages/ketcher-core/src/domain/entities/Nucleoside.ts +++ b/packages/ketcher-core/src/domain/entities/Nucleoside.ts @@ -2,6 +2,7 @@ import { RNABase } from 'domain/entities/RNABase'; import { Sugar } from 'domain/entities/Sugar'; import assert from 'assert'; import { + getNextMonomerInChain, getRnaBaseFromSugar, isValidNucleoside, isValidNucleotide, @@ -97,6 +98,10 @@ export class Nucleoside { } public get modified() { - return this.rnaBase.isModification || this.sugar.isModification; + const isNotLastNode = !!getNextMonomerInChain(this.sugar); + + return ( + this.rnaBase.isModification || this.sugar.isModification || isNotLastNode + ); } }