Fix EPC export: match end box position and stroke width to canvas renderer
- Right box x offset: 0 → -rb.w (extend backward, matching canvas) - Stroke width: hardcoded 0.3 → EPC_CONFIG.lineWidth (1.5, matching line) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
595c47fbf8
commit
20b9547578
@ -191,7 +191,7 @@ async function emitEpc(lines: string[], sym: PlacedSymbol, label: string, outerT
|
||||
const ppx = ox + prev.x, ppy = oy + prev.y;
|
||||
const rAngle = Math.atan2(ply - ppy, plx - ppx) * 180 / Math.PI;
|
||||
const rb = EPC_CONFIG.rightBox;
|
||||
parts.push(` <rect x="${-rb.w}" y="${-rb.h / 2}" width="${rb.w}" height="${rb.h}" fill="#aaaaaa" stroke="#000000" stroke-width="${EPC_CONFIG.lineWidth}" transform="translate(${plx},${ply}) rotate(${(rAngle - 90).toFixed(2)})" />`);
|
||||
parts.push(` <rect x="${-rb.w}" y="${-rb.h / 2}" width="${rb.w}" height="${rb.h}" fill="#aaaaaa" stroke="#000000" stroke-width="${EPC_CONFIG.lineWidth}" transform="translate(${plx},${ply}) rotate(${rAngle.toFixed(2)})" />`);
|
||||
}
|
||||
|
||||
lines.push(` <g id="${label}" inkscape:label="${label}"${tAttr}>`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user