From 587e870ba7e1447488997b7e338eadaa5531eed3 Mon Sep 17 00:00:00 2001 From: woodjes Date: Fri, 16 Dec 2022 12:17:58 +0000 Subject: [PATCH] FLow icons in flow diagrams #CTCTOWALTZ-2618 #6350 --- .../source-and-target-graph.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/waltz-ng/client/logical-flow/components/source-and-target-graph/source-and-target-graph.js b/waltz-ng/client/logical-flow/components/source-and-target-graph/source-and-target-graph.js index 65632839a1..2f88de41f8 100644 --- a/waltz-ng/client/logical-flow/components/source-and-target-graph/source-and-target-graph.js +++ b/waltz-ng/client/logical-flow/components/source-and-target-graph/source-and-target-graph.js @@ -389,17 +389,19 @@ function drawLabels(section, items = [], scale, anchor = "start", tweakers) { .attr("transform", `translate(0,0)`) .style("fill", d => d.deprecated ? amberHex : "inherit"); - newLabels - .append("path") - .classed("wsat-icon", true) - .attr("d", d => tweakers.pfIcon(d).svgIcon) - .attr("stroke", d => tweakers.pfIcon(d).color) - .attr("transform", `translate(0,${iconAdjustment})`) - .attr("fill", "none"); + if (tweakers.pfIcon) { + newLabels + .append("path") + .classed("wsat-icon", true) + .attr("d", d => tweakers.pfIcon(d).svgIcon) + .attr("stroke", d => tweakers.pfIcon(d).color) + .attr("transform", `translate(0, ${iconAdjustment})`) + .attr("fill", "none"); + } newLabels .append("text") - .classed("wsat-cuIcon",true) + .classed("wsat-cuIcon", true) .attr("dx", cuIconAdjustment) .attr("font-family", "FontAwesome"); @@ -423,9 +425,7 @@ function drawLabels(section, items = [], scale, anchor = "start", tweakers) { .append("path") .attr("d", d => tweakers.pfIcon(d).svgIcon) .attr("stroke", d => tweakers.pfIcon(d).color) - // .attr("stroke-width", 0.1) .attr("fill", "none"); - // .text((d) => tweakers.pfIcon(d).code || ""); } if(tweakers.cuIcon) {