fix(rsocials): remove duplicate port labels in campaign workflow nodes
SVG text labels were rendering alongside HTML span labels, causing each input/output name to appear twice on drag & drop nodes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cccd0a09f7
commit
78284e448c
|
|
@ -399,17 +399,6 @@ class FolkCampaignWorkflow extends HTMLElement {
|
|||
</g>`;
|
||||
}
|
||||
|
||||
// Port labels
|
||||
let portLabelHtml = '';
|
||||
for (const inp of def.inputs) {
|
||||
const y = getPortY(node, inp.name, 'input');
|
||||
portLabelHtml += `<text x="${node.position.x + 14}" y="${y + 4}" fill="#94a3b8" font-size="9">${inp.name}</text>`;
|
||||
}
|
||||
for (const out of def.outputs) {
|
||||
const y = getPortY(node, out.name, 'output');
|
||||
portLabelHtml += `<text x="${node.position.x + NODE_WIDTH - 14}" y="${y + 4}" fill="#94a3b8" font-size="9" text-anchor="end">${out.name}</text>`;
|
||||
}
|
||||
|
||||
return `
|
||||
<g class="cw-node ${isSelected ? 'selected' : ''}" data-node-id="${node.id}">
|
||||
<foreignObject x="${node.position.x}" y="${node.position.y}" width="${NODE_WIDTH}" height="${NODE_HEIGHT}">
|
||||
|
|
@ -430,7 +419,6 @@ class FolkCampaignWorkflow extends HTMLElement {
|
|||
</div>
|
||||
</foreignObject>
|
||||
${portsHtml}
|
||||
${portLabelHtml}
|
||||
</g>`;
|
||||
}
|
||||
|
||||
|
|
@ -567,24 +555,6 @@ class FolkCampaignWorkflow extends HTMLElement {
|
|||
c.setAttribute('cy', String(y));
|
||||
});
|
||||
});
|
||||
const labels = g.querySelectorAll('text');
|
||||
let labelIdx = 0;
|
||||
for (const inp of def.inputs) {
|
||||
if (labels[labelIdx]) {
|
||||
const y = getPortY(node, inp.name, 'input');
|
||||
labels[labelIdx].setAttribute('x', String(node.position.x + 14));
|
||||
labels[labelIdx].setAttribute('y', String(y + 4));
|
||||
}
|
||||
labelIdx++;
|
||||
}
|
||||
for (const out of def.outputs) {
|
||||
if (labels[labelIdx]) {
|
||||
const y = getPortY(node, out.name, 'output');
|
||||
labels[labelIdx].setAttribute('x', String(node.position.x + NODE_WIDTH - 14));
|
||||
labels[labelIdx].setAttribute('y', String(y + 4));
|
||||
}
|
||||
labelIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
private refreshConfigPanel() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue