Skip to content
Snippets Groups Projects
Commit 7fe27e56 authored by Lukas Pravda's avatar Lukas Pravda
Browse files

get ready for ccdutils 0.6

parent 3cc4c357
No related branches found
No related tags found
No related merge requests found
......@@ -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.tspans.length; i++) {
for (var i = 0; i < x.labels.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)
}
});
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment