Adjust the label a little
This commit is contained in:
@@ -446,13 +446,15 @@ function renderPersons(
|
|||||||
.attr('fill', 'none');
|
.attr('fill', 'none');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Label
|
// Label (positioned below connection lines)
|
||||||
|
// Vertical lines to children end at childY - halfSymbol = parentY + verticalSpacing - 20 = parentY + 80
|
||||||
|
// So label must be > 80 to avoid overlap. Using 85.
|
||||||
if (options.showLabels && person.metadata.label) {
|
if (options.showLabels && person.metadata.label) {
|
||||||
personGroup
|
personGroup
|
||||||
.append('text')
|
.append('text')
|
||||||
.attr('class', 'person-label')
|
.attr('class', 'person-label')
|
||||||
.attr('x', 0)
|
.attr('x', 0)
|
||||||
.attr('y', options.symbolSize / 2 + 15)
|
.attr('y', options.symbolSize / 2 + 65)
|
||||||
.attr('text-anchor', 'middle')
|
.attr('text-anchor', 'middle')
|
||||||
.attr('font-size', '12px')
|
.attr('font-size', '12px')
|
||||||
.attr('font-family', 'sans-serif')
|
.attr('font-family', 'sans-serif')
|
||||||
@@ -465,7 +467,7 @@ function renderPersons(
|
|||||||
.append('text')
|
.append('text')
|
||||||
.attr('class', 'person-id')
|
.attr('class', 'person-id')
|
||||||
.attr('x', 0)
|
.attr('x', 0)
|
||||||
.attr('y', options.symbolSize / 2 + 15)
|
.attr('y', options.symbolSize / 2 + 65)
|
||||||
.attr('text-anchor', 'middle')
|
.attr('text-anchor', 'middle')
|
||||||
.attr('font-size', '11px')
|
.attr('font-size', '11px')
|
||||||
.attr('font-family', 'sans-serif')
|
.attr('font-family', 'sans-serif')
|
||||||
|
|||||||
Reference in New Issue
Block a user