-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backmerge: #4399 - Different chains shown by the same sequence in seq…
…uence mode (system ignores sugar presence) (#4681)
- Loading branch information
Showing
38 changed files
with
89 additions
and
35 deletions.
There are no files selected for viewing
Binary file modified
BIN
+39 Bytes
(100%)
...cated--e1550-en-pasted-fragment-is-considered-as-new-chain-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-672 Bytes
(97%)
...cated--f4d93-en-pasted-fragment-is-considered-as-new-chain-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-95 Bytes
(100%)
...r-edit-mode-Copy-paste-selection-with-LClick-drag-and-undo-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-155 Bytes
(100%)
...r-edit-mode-Copy-paste-selection-with-LClick-drag-and-undo-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-161 Bytes
(100%)
...r-edit-mode-Copy-paste-selection-with-LClick-drag-and-undo-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-155 Bytes
(100%)
...elect--1104a-owLeft-then-paste-ket-from-clipboard-and-undo-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-163 Bytes
(100%)
...elect--18554-t-then-paste-sequence-from-clipboard-and-undo-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-113 Bytes
(100%)
...elect--49151-t-then-paste-sequence-from-clipboard-and-undo-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-105 Bytes
(100%)
...elect--68b8f-owLeft-then-paste-ket-from-clipboard-and-undo-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-150 Bytes
(100%)
...elect--d04bc-t-then-paste-sequence-from-clipboard-and-undo-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+104 Bytes
(100%)
...elect--fad51-owLeft-then-paste-ket-from-clipboard-and-undo-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+88 Bytes
(100%)
...e-for-view-mode-Copy-paste-selection-with-rectangular-tool-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+111 Bytes
(100%)
...e-for-view-mode-Copy-paste-selection-with-rectangular-tool-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+92 Bytes
(100%)
...elect--0f3ce-with-Ctrl-Lclick-then-copy-and-paste-and-undo-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+82 Bytes
(100%)
...elect--87e1a-with-Ctrl-Lclick-then-copy-and-paste-and-undo-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+90 Bytes
(100%)
...elect--e2c16-with-Ctrl-Lclick-then-copy-and-paste-and-undo-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+75 Bytes
(100%)
...dit.spec.ts-snapshots/Sequence-edit-mode-Add-edit-sequence-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+88 Bytes
(100%)
...de-selection-for-edit-mode-Select-letters-with-LClick-drag-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+88 Bytes
(100%)
...de-selection-for-edit-mode-Select-letters-with-LClick-drag-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+88 Bytes
(100%)
...e-Select-letters-with-Shift-ArrowLeft-then-delete-and-undo-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+108 Bytes
(100%)
...e-Select-letters-with-Shift-ArrowLeft-then-delete-and-undo-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+91 Bytes
(100%)
...e-Select-letters-with-Shift-ArrowLeft-then-delete-and-undo-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+88 Bytes
(100%)
...e-Select-letters-with-Shift-ArrowLeft-then-delete-and-undo-4-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+91 Bytes
(100%)
...-for-edit-mode-Select-letters-with-Shift-ArrowRight-button-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+80 Bytes
(100%)
...-for-edit-mode-Select-letters-with-Shift-ArrowRight-button-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+82 Bytes
(100%)
...lection-for-view-mode-Select-entire-chain-with-Ctrl-Lclick-1-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+87 Bytes
(100%)
...e-selection-for-view-mode-Select-letters-with-Shift-Lclick-1-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+88 Bytes
(100%)
...r-view-mode-Select-letters-with-rectangular-selection-tool-1-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+233 Bytes
(100%)
...snapshots/Sequence-Mode-Open-modified-RNA-in-sequence-mode-1-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+166 Bytes
(100%)
...snapshots/Sequence-Mode-Open-modified-RNA-in-sequence-mode-2-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+88 Bytes
(100%)
...ence-Mode-Open-monomers-chains-and-switch-to-sequence-mode-2-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+235 Bytes
(100%)
...de-Open-monomers-cyclic-chains-and-switch-to-sequence-mode-1-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+80 Bytes
(100%)
...-flex-view-to-sequence-view-to-snake-view-and-back-to-flex-1-chromium-linux.png
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
.../ketcher-core/src/application/render/renderers/sequence/NucleosideSequenceItemRenderer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Nucleoside, Phosphate } from 'domain/entities'; | ||
import { getNextMonomerInChain } from 'domain/helpers/monomers'; | ||
import { RNASequenceItemRenderer } from './RNASequenceItemRenderer'; | ||
import { D3SvgElementSelection } from 'application/render/types'; | ||
|
||
export class NucleosideSequenceItemRenderer extends RNASequenceItemRenderer { | ||
private nucleosideCircleElement?: D3SvgElementSelection< | ||
SVGCircleElement, | ||
void | ||
>; | ||
|
||
protected drawModification() { | ||
const node = this.node as Nucleoside; | ||
const nextNode = getNextMonomerInChain(node.sugar); | ||
|
||
this.drawCommonModification(node); | ||
|
||
if (this.nucleosideCircleElement) { | ||
this.nucleosideCircleElement.remove(); | ||
} | ||
|
||
// show modification for not last Nucleoside | ||
if (nextNode && !(nextNode instanceof Phosphate)) { | ||
this.nucleosideCircleElement = 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'); | ||
} | ||
} | ||
} |
39 changes: 6 additions & 33 deletions
39
.../ketcher-core/src/application/render/renderers/sequence/NucleotideSequenceItemRenderer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/ketcher-core/src/application/render/renderers/sequence/RNASequenceItemRenderer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { BaseSequenceItemRenderer } from 'application/render/renderers/sequence/BaseSequenceItemRenderer'; | ||
import { Nucleoside, Nucleotide } from 'domain/entities'; | ||
|
||
export abstract class RNASequenceItemRenderer extends BaseSequenceItemRenderer { | ||
get symbolToDisplay(): string { | ||
return ( | ||
this.node.monomer.attachmentPointsToBonds.R3?.getAnotherMonomer( | ||
this.node.monomer, | ||
)?.monomerItem?.props.MonomerNaturalAnalogCode || '@' | ||
); | ||
} | ||
|
||
protected drawCommonModification(node: Nucleoside | Nucleotide) { | ||
if (node.rnaBase.isModification) { | ||
this.backgroundElement?.attr( | ||
'fill', | ||
this.node.monomer.selected | ||
? this.isSequenceEditInRnaBuilderModeTurnedOn | ||
? '#41A8B2' | ||
: '#3ACA6A' | ||
: this.isSequenceEditModeTurnedOn | ||
? '#ff7a004f' | ||
: '#CAD3DD', | ||
); | ||
} | ||
|
||
if (node.sugar.isModification) { | ||
this.backgroundElement | ||
?.attr( | ||
'stroke', | ||
this.isSequenceEditInRnaBuilderModeTurnedOn ? '#24545A' : '#585858', | ||
) | ||
.attr('stroke-width', '1px'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters