algairim commented on a change in pull request #255:
URL: https://github.com/apache/brooklyn-ui/pull/255#discussion_r674564922
##########
File path: ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
##########
@@ -838,11 +827,77 @@ export function D3Blueprint(container, options) {
return `M ${sourceNode.x},${sourceY} A ${dr},${dr} 0
0,${sweep} ${m.x},${m.y}`;
});
- relationData.exit()
+ relationArcs.exit()
.transition()
.duration(_configHolder.transition)
.attr('opacity', 0)
.remove();
+
+ // ====== RELATIONSHIP LABELS =========
+ // Draw relationship labels that follow paths, somewhere in the middle
of paths.
+ // NOTE <textPath/> DECREASES THE UI PERFORMANCE, USE LABELS WITH
CAUTION.
+
+ _relationLabels.selectAll('.relation-label').remove(); // Re-draw
labels every time, required to refresh changes.
Review comment:
Re-binding data for multiple labels in a single direction does not
resolve the case when paths are re-assigned, especially when there can be more
than one relationship type per direction. For that reason - re-draw them every
time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]