Skip to content

Commit b3ff6d3

Browse files
committed
v2.2.8, add names to complexes
1 parent dd24af4 commit b3ff6d3

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

dist/complexviewer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "complexviewer",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"description": "A network visualisation that displays molecular interaction data, including detailed residue-level information such as binding sites. Used in EBI's Complex Portal and elsewhere.",
55
"author": {
66
"name": "Colin Combe",

src/js/viz/interactor/complex.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import {svgns} from "../../svgns";
66
export class Complex extends Interactor {
77
constructor(id, app, interactor, interactorRef) {
88
super();
9-
10-
this.init(id, app, interactor, "");//interactorRef);
9+
const complexIdMatch = interactorRef.match(/^.*(CPX-[0-9]+).*$/);
10+
const complexId = complexIdMatch ? complexIdMatch[1] : "";
11+
this.init(id, app, interactor, complexId);
1112
this.type = "complex";
1213
this.upperGroup = document.createElementNS(svgns, "g");
1314
this.initLabel();

0 commit comments

Comments
 (0)