viz: fix disasm node width (#14079)

This commit is contained in:
qazal
2026-01-09 16:37:37 +09:00
committed by GitHub
parent c70c112254
commit f3f4d9b387
+1 -1
View File
@@ -25,7 +25,7 @@ const layoutCfg = (g, { blocks, paths, pc_tokens, counters, colors }) => {
const num = counters?.[m]?.hit_count ?? 0;
if (num > maxColor) maxColor = num;
label.push(tokens.map((t, i) => ({st:t.st, keys:t.keys, color:counters != null ? num : tokenColors[t.kind]})));
width = Math.max(width, ctx.measureText(tokens.join(" ")).width);
width = Math.max(width, ctx.measureText(tokens.map((t) => t.st).join("")).width);
height += lineHeight;
}
g.setNode(lead, { ...rectDims(width, height), label, id:lead, color:"#1a1b26" });