Spur label: use same height padding as conveyors for consistent font size
Spur was using availH=h (no padding) giving 14px, while conveyors used availH=h-4 giving 13px. Now both use the same padding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7f9fb6608c
commit
053b034a2a
@ -569,7 +569,7 @@ function drawConveyanceLabel(ctx: CanvasRenderingContext2D, sym: PlacedSymbol) {
|
|||||||
cx = sym.x + Math.max(maxTextW / 2, rightEdge - maxTextW / 2);
|
cx = sym.x + Math.max(maxTextW / 2, rightEdge - maxTextW / 2);
|
||||||
cy = sym.y + optCy;
|
cy = sym.y + optCy;
|
||||||
availW = Infinity;
|
availW = Infinity;
|
||||||
availH = sym.h;
|
availH = sym.h - pad * 2;
|
||||||
} else {
|
} else {
|
||||||
cx = sym.x + sym.w / 2;
|
cx = sym.x + sym.w / 2;
|
||||||
cy = sym.y + sym.h / 2;
|
cy = sym.y + sym.h / 2;
|
||||||
|
|||||||
@ -53,7 +53,7 @@ function emitConveyanceLabelInner(lines: string[], sym: PlacedSymbol) {
|
|||||||
const estTextW = Math.max(...textLines.map(l => l.length * 8));
|
const estTextW = Math.max(...textLines.map(l => l.length * 8));
|
||||||
labelCx = sym.x + Math.max(estTextW / 2, rightEdge - estTextW / 2);
|
labelCx = sym.x + Math.max(estTextW / 2, rightEdge - estTextW / 2);
|
||||||
labelCy = sym.y + optCy;
|
labelCy = sym.y + optCy;
|
||||||
availH = sym.h;
|
availH = sym.h - 4;
|
||||||
} else if (isInductionType(sym.symbolId)) {
|
} else if (isInductionType(sym.symbolId)) {
|
||||||
const stripTopY = sym.y + sym.h * INDUCTION_CONFIG.stripTopFrac;
|
const stripTopY = sym.y + sym.h * INDUCTION_CONFIG.stripTopFrac;
|
||||||
const stripBottomY = sym.y + sym.h * INDUCTION_CONFIG.stripBottomFrac;
|
const stripBottomY = sym.y + sym.h * INDUCTION_CONFIG.stripBottomFrac;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user