Anchor net labels to routed segments to avoid floating labels
Some checks are pending
CI / test (push) Waiting to run
Some checks are pending
CI / test (push) Waiting to run
This commit is contained in:
parent
cc20c0cc25
commit
f0b952e3a2
@ -643,6 +643,10 @@ export function renderSvgFromLayout(model, layout, options = {}) {
|
||||
if (routeInfo?.labelPoints?.length) {
|
||||
candidates.push(...routeInfo.labelPoints);
|
||||
}
|
||||
const routeCenter = representativePoint(routeInfo, netAnchor);
|
||||
if (routeCenter) {
|
||||
candidates.push({ x: routeCenter.x + 8, y: routeCenter.y - 8 });
|
||||
}
|
||||
if (netAnchor) {
|
||||
candidates.push({ x: netAnchor.x + 8, y: netAnchor.y - 8 });
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user