Export overlay devices (PE, FIO/SIO, DPM, PDP, MCM) on top of conveyance
Split SVG export into two passes: base conveyance symbols first, then overlay devices rendered last so they appear on top in the exported SVG. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
94c57b4708
commit
271f646e1d
@ -29,8 +29,20 @@ export async function exportSVG() {
|
|||||||
` <rect width="${layout.canvasW}" height="${layout.canvasH}" fill="#ffffff" />`,
|
` <rect width="${layout.canvasW}" height="${layout.canvasH}" fill="#ffffff" />`,
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const sym of layout.symbols) {
|
// Overlay types render on top of base conveyance
|
||||||
if (sym.hidden || layout.hiddenGroups.has(getSymbolGroup(sym.symbolId))) continue;
|
const OVERLAY_IDS = new Set([
|
||||||
|
'photoeye', 'photoeye_v',
|
||||||
|
'fio_sio_fioh', 'fio_sio_fioh_v',
|
||||||
|
'dpm', 'dpm_v',
|
||||||
|
'pdp', 'pdp_v',
|
||||||
|
'mcm', 'mcm_v',
|
||||||
|
]);
|
||||||
|
|
||||||
|
const visible = layout.symbols.filter(s => !s.hidden && !layout.hiddenGroups.has(getSymbolGroup(s.symbolId)));
|
||||||
|
const baseSymbols = visible.filter(s => !OVERLAY_IDS.has(s.symbolId));
|
||||||
|
const overlaySymbols = visible.filter(s => OVERLAY_IDS.has(s.symbolId));
|
||||||
|
|
||||||
|
for (const sym of [...baseSymbols, ...overlaySymbols]) {
|
||||||
const rot = sym.rotation || 0;
|
const rot = sym.rotation || 0;
|
||||||
const mirrored = sym.mirrored || false;
|
const mirrored = sym.mirrored || false;
|
||||||
const cx = sym.x + sym.w / 2;
|
const cx = sym.x + sym.w / 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user