Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
pdbe
web-components
pdb-ligand-env
Commits
7fe27e56
Commit
7fe27e56
authored
Apr 22, 2021
by
Lukas Pravda
Browse files
get ready for ccdutils 0.6
parent
3cc4c357
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
src/plugin/depiction.ts
src/plugin/depiction.ts
+9
-14
No files found.
src/plugin/depiction.ts
View file @
7fe27e56
...
...
@@ -177,26 +177,21 @@ class Depiction {
*/
private
appendLabels
()
{
let
data
=
this
.
atoms
.
filter
(
x
=>
x
.
labels
.
length
>
0
)
?.
map
(
x
=>
x
.
labels
)
?.
reduce
((
a
,
b
)
=>
a
.
concat
(
b
));
.
filter
(
x
=>
x
.
labels
.
length
>
0
);
this
.
structure
.
selectAll
()
.
data
(
data
)
.
enter
()
.
append
(
'
text
'
)
.
attr
(
'
filter
'
,
"
url(#solid-background)
"
)
.
attr
(
'
style
'
,
(
x
:
any
)
=>
x
.
style
)
.
attr
(
'
x
'
,
(
x
:
any
)
=>
x
.
x
)
.
attr
(
'
y
'
,
(
x
:
any
)
=>
x
.
y
)
.
attr
(
'
dominant-baseline
'
,
(
x
:
any
)
=>
x
[
'
dominant-baseline
'
])
.
attr
(
'
text-anchor
'
,
(
x
:
any
)
=>
x
[
'
text-anchor
'
])
.
append
(
'
g
'
)
.
attr
(
'
filter
'
,
'
url(#solid-background)
'
)
.
each
(
function
(
x
:
any
)
{
for
(
var
i
=
0
;
i
<
x
.
tspan
s
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
x
.
label
s
.
length
;
i
++
)
{
d3
.
select
(
this
)
.
append
(
'
tspan
'
)
.
attr
(
'
style
'
,
x
.
tspans
[
i
].
style
)
.
text
(
x
.
tspans
[
i
].
value
);
.
append
(
'
path
'
)
.
attr
(
'
d
'
,
x
.
labels
[
i
].
d
)
.
style
(
"
background-color
"
,
"
white
"
)
.
attr
(
'
fill
'
,
x
.
labels
[
i
].
fill
)
}
});
}
...
...
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