Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pdbe
web-components
pdb-ligand-env
Commits
9125d5ba
Commit
9125d5ba
authored
Oct 17, 2020
by
Lukas Pravda
Browse files
change the way node labels are made
parent
13fdbeaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/plugin/manager.ts
src/plugin/manager.ts
+1
-1
src/plugin/model.ts
src/plugin/model.ts
+12
-1
No files found.
src/plugin/manager.ts
View file @
9125d5ba
...
...
@@ -620,7 +620,7 @@ class Visualization {
.
style
(
'
text-anchor
'
,
'
middle
'
)
.
style
(
'
dominant-baseline
'
,
'
central
'
)
.
each
(
function
(
e
:
Model
.
InteractionNode
)
{
let
labels
=
[
e
.
residue
.
chemCompId
,
`
${
e
.
residue
.
chainId
}
${
e
.
residue
.
authorResidueNumber
}
`
];
let
labels
=
[
e
.
residue
.
chemCompId
,
e
.
residue
.
authorResidueNumber
];
for
(
let
i
=
0
;
i
<
labels
.
length
;
i
++
)
{
d3
.
select
(
this
)
.
append
(
'
tspan
'
)
...
...
src/plugin/model.ts
View file @
9125d5ba
...
...
@@ -149,7 +149,18 @@ namespace Model {
}
public
toString
():
string
{
return
`
${
this
.
residue
.
chemCompId
}
${
this
.
residue
.
chainId
}
${
this
.
residue
.
authorResidueNumber
}${
this
.
residue
.
authorInsertionCode
}
`
;
let
r
=
this
.
residue
;
let
splitted
=
r
.
chainId
.
split
(
'
_
'
);
let
chainStr
=
splitted
[
0
];
let
symString
=
""
;
if
(
splitted
.
length
>
1
)
{
symString
=
splitted
[
1
]
!==
"
1
"
?
`[
${
splitted
[
1
]}
]`
:
""
;
}
let
str
=
`
${
r
.
chemCompId
}
|
${
chainStr
}${
symString
}
|
${
r
.
authorResidueNumber
}${
r
.
authorInsertionCode
}
`
;
return
str
;
}
public
toTooltip
():
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment