diff --git a/svelte-app/src/lib/canvas/renderer.ts b/svelte-app/src/lib/canvas/renderer.ts index cdbedfc..4077556 100644 --- a/svelte-app/src/lib/canvas/renderer.ts +++ b/svelte-app/src/lib/canvas/renderer.ts @@ -556,9 +556,10 @@ function drawConveyanceLabel(ctx: CanvasRenderingContext2D, sym: PlacedSymbol) { let cx: number, cy: number, availW: number, availH: number; if (isSpurType(sym.symbolId)) { const w2 = sym.w2 ?? sym.w; - // Center text in the right half (wide area) of the trapezoid - cx = sym.x + (w2 + sym.w) / 2; - cy = sym.y + sym.h / 2; + // Center text at the right-angle corner (w, h) where the most space is. + // The right edge at mid-height is at (w2+w)/2. Shift further right. + cx = sym.x + sym.w * 0.65; + cy = sym.y + sym.h * 0.65; availW = sym.w; availH = sym.h; } else { diff --git a/svelte-app/src/lib/export.ts b/svelte-app/src/lib/export.ts index c6d788d..0e18852 100644 --- a/svelte-app/src/lib/export.ts +++ b/svelte-app/src/lib/export.ts @@ -43,10 +43,9 @@ function emitConveyanceLabelInner(lines: string[], sym: PlacedSymbol) { // Mirror: label follows the mirrored shape naturally textRotDeg = (textRotRad * 180) / Math.PI; } else if (isSpurType(sym.symbolId)) { - const w2 = sym.w2 ?? sym.w; - labelCx = sym.x + (w2 + sym.w) / 2; - labelCy = sym.y + sym.h / 2; - availH = sym.h - 4; + labelCx = sym.x + sym.w * 0.65; + labelCy = sym.y + sym.h * 0.65; + availH = sym.h; } else if (isInductionType(sym.symbolId)) { const stripTopY = sym.y + sym.h * INDUCTION_CONFIG.stripTopFrac; const stripBottomY = sym.y + sym.h * INDUCTION_CONFIG.stripBottomFrac;