Commit 7fe27e56 authored by Lukas Pravda's avatar Lukas Pravda
Browse files

get ready for ccdutils 0.6

parent 3cc4c357
...@@ -177,26 +177,21 @@ class Depiction { ...@@ -177,26 +177,21 @@ class Depiction {
*/ */
private appendLabels() { private appendLabels() {
let data = this.atoms let data = this.atoms
.filter(x => x.labels.length > 0) .filter(x => x.labels.length > 0);
?.map(x => x.labels)
?.reduce((a, b) => a.concat(b));
this.structure.selectAll() this.structure.selectAll()
.data(data) .data(data)
.enter() .enter()
.append('text') .append('g')
.attr('filter', "url(#solid-background)") .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'])
.each(function (x: any) { .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) d3.select(this)
.append('tspan') .append('path')
.attr('style', x.tspans[i].style) .attr('d', x.labels[i].d)
.text(x.tspans[i].value); .style("background-color", "white")
.attr('fill', x.labels[i].fill)
} }
}); });
} }
......
Markdown is supported
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