Improve label readability with collision suppression and zoom density
This commit is contained in:
1 parent
85e5a345f1
commit
f938c6dcbc
2 files changed
+120
-2
No files matched your search
+2
-2
@@ -437,8 +437,8 @@ export function renderSvgFromLayout(model, layout, options = {}) {
|
||||
${pinCoreSvg}
|
||||
</g>
|
||||
${pinLabelsSvg}
|
||||
<text x="${x + 8}" y="${refY}" font-size="${compactLabel ? 11 : 12}" font-weight="700" fill="#111827" stroke="#f8fafc" stroke-width="2.2" paint-order="stroke fill">${esc(refLabel)}</text>
|
||||
<text x="${x + 8}" y="${valueY}" font-size="${compactLabel ? 9 : 10}" fill="#667085" stroke="#f8fafc" stroke-width="2" paint-order="stroke fill">${esc(valueLabel)}</text>
|
||||
<text x="${x + 8}" y="${refY}" font-size="${compactLabel ? 11 : 12}" font-weight="700" fill="#111827" stroke="#f8fafc" stroke-width="2.2" paint-order="stroke fill" data-ref-label="${esc(inst.ref)}">${esc(refLabel)}</text>
|
||||
<text x="${x + 8}" y="${valueY}" font-size="${compactLabel ? 9 : 10}" fill="#667085" stroke="#f8fafc" stroke-width="2" paint-order="stroke fill" data-value-label="${esc(inst.ref)}">${esc(valueLabel)}</text>
|
||||
</g>`;
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
Reference in new issue
Block a user