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:
igurielidze 2026-03-30 21:44:08 +04:00
parent 7f9fb6608c
commit 053b034a2a
2 changed files with 2 additions and 2 deletions

View File

@ -569,7 +569,7 @@ function drawConveyanceLabel(ctx: CanvasRenderingContext2D, sym: PlacedSymbol) {
cx = sym.x + Math.max(maxTextW / 2, rightEdge - maxTextW / 2);
cy = sym.y + optCy;
availW = Infinity;
availH = sym.h;
availH = sym.h - pad * 2;
} else {
cx = sym.x + sym.w / 2;
cy = sym.y + sym.h / 2;

View File

@ -53,7 +53,7 @@ function emitConveyanceLabelInner(lines: string[], sym: PlacedSymbol) {
const estTextW = Math.max(...textLines.map(l => l.length * 8));
labelCx = sym.x + Math.max(estTextW / 2, rightEdge - estTextW / 2);
labelCy = sym.y + optCy;
availH = sym.h;
availH = sym.h - 4;
} else if (isInductionType(sym.symbolId)) {
const stripTopY = sym.y + sym.h * INDUCTION_CONFIG.stripTopFrac;
const stripBottomY = sym.y + sym.h * INDUCTION_CONFIG.stripBottomFrac;