This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit cfd1ba3dbad89ab1943e48140510ee8684f4b12c Author: Mykola Mandra <[email protected]> AuthorDate: Wed Jun 23 10:58:18 2021 +0100 Add more code comments around label logic Signed-off-by: Mykola Mandra <[email protected]> --- ui-modules/blueprint-composer/app/components/util/d3-blueprint.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js b/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js index 09e562f..b2fcc26 100755 --- a/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js +++ b/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js @@ -792,11 +792,11 @@ export function D3Blueprint(container, options) { .attr('dominant-baseline', 'middle') .attr('text-anchor', 'middle') .attr('font-family', 'monospace') - .attr('fill', '#f5f6fa') + .attr('fill', '#f5f6fa') // colour of the canvas .insert('textPath') .attr('hidden', (d) => (d.label ? null : '')) .attr('xlink:href', (d)=>('#' + d.source._id + '-' + d.target._id)) - .attr('startOffset', '59%') + .attr('startOffset', '59%') // 59% roughly reflects `middle of the arch` minus `node radius`. .html((d) => (d.label ? '█'.repeat(d.label.length + 2) : null)); relationDataEntered.insert('text') // Add label text on top of '█'s which is on top of the path. .attr('dominant-baseline', 'middle') @@ -805,7 +805,7 @@ export function D3Blueprint(container, options) { .insert('textPath') .attr('hidden', (d) => (d.label ? null : '')) .attr('xlink:href', (d)=>('#' + d.source._id + '-' + d.target._id)) - .attr('startOffset', '59%') + .attr('startOffset', '59%') // 59% roughly reflects `middle of the arch` minus `node radius`. .html((d) => (d.label ? ' ' + d.label + ' ': null)); // Draw the transition
