Skip to content

Commit

Permalink
HWE: Fix Chain getHelm for cyclic
Browse files Browse the repository at this point in the history
  • Loading branch information
tanas80 committed Aug 29, 2024
1 parent fbafdde commit c83b7d5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions HELM/source/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# HELMWebEditor changelog

## 1.1.11 (2024-08-29)

Fix Chain getHelm for cyclic

## 1.1.10 (2024-08-27)

Public Mol.name attribute (bump JSDraw dependency version)
Expand Down
26 changes: 14 additions & 12 deletions HELM/source/helm/Chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,18 +709,20 @@ class ChainInt {

if (this.isCircle()) {
const b = this.bonds[this.bonds.length - 1];
// RNA1,RNA1,1:R1-21:R2
let conn;
if (this.atoms[0] == b.a1)
conn = b.a1._aaid + ":R" + b.r1 + "-" + b.a2._aaid + ":R" + b.r2;
else
conn = b.a2._aaid + ":R" + b.r2 + "-" + b.a1._aaid + ":R" + b.r1;

let tag = "";
if (!scil.Utils.isNullOrEmpty(b.tag))
tag = '\"' + b.tag.replace(/"/g, "\\\"") + '\"';

ret.connections.push(firstseqid + "," + lastseqid + "," + conn);
// // RNA1,RNA1,1:R1-21:R2
// let conn;
// if (this.atoms[0] == b.a1)
// conn = b.a1._aaid + ":R" + b.r1 + "-" + b.a2._aaid + ":R" + b.r2;
// else
// conn = b.a2._aaid + ":R" + b.r2 + "-" + b.a1._aaid + ":R" + b.r1;
//
// let tag = "";
// if (!scil.Utils.isNullOrEmpty(b.tag))
// tag = '\"' + b.tag.replace(/"/g, "\\\"") + '\"';
//
// ret.connections.push(firstseqid + "," + lastseqid + "," + conn);

org.helm.webeditor.IO.addConnection(ret, firstseqid, lastseqid, b.a1, b.a2, b.r1, b.r2, null, null, b.tag, highlightselection && b.selected);
}
}

Expand Down
4 changes: 2 additions & 2 deletions HELM/source/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion HELM/source/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datagrok-libraries/helm-web-editor",
"friendlyName": "HELMWebEditor",
"version": "1.1.10",
"version": "1.1.11",
"description": "HELMWebEditor forked from Pistoia Alliance",
"dependencies": {
"@datagrok-libraries/js-draw-lite": "^0.0.8"
Expand Down

0 comments on commit c83b7d5

Please sign in to comment.