Render all non-conveyance devices on top in SVG/JSON export

All small/overlay devices (PE, FIO, BCN, SOL, JR, S, SS, EPC, DPM,
PDP, MCM, PS, diverter, camera) render LAST so they're on top of
conveyors and clickable in SCADA.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
igurielidze 2026-03-31 16:28:09 +04:00
parent 006623c43d
commit 8a52449dfe

View File

@ -178,13 +178,24 @@ async function buildSvgString(): Promise<string> {
` <rect width="${layout.canvasW}" height="${layout.canvasH}" fill="#ffffff" />`, ` <rect width="${layout.canvasW}" height="${layout.canvasH}" fill="#ffffff" />`,
]; ];
// Overlay types render on top of base conveyance // Overlay types render LAST (on top) so they're clickable in SCADA
const OVERLAY_IDS = new Set([ const OVERLAY_IDS = new Set([
'photoeye', 'photoeye_v', 'photoeye', 'photoeye_v',
'fio_sio_fioh', 'fio_sio_fioh_v', 'fio_sio_fioh', 'fio_sio_fioh_v',
'dpm', 'dpm_v', 'dpm', 'dpm_v',
'pdp', 'pdp_v', 'pdp', 'pdp_v',
'mcm', 'mcm_v', 'mcm', 'mcm_v',
'beacon', 'beacon_v',
'solenoid', 'solenoid_v',
'jam_reset', 'jam_reset_v',
'start', 'start_v',
'start_stop', 'start_stop_v',
'chute_enable', 'chute_enable_v',
'package_release', 'package_release_v',
'pressure_sensor', 'pressure_sensor_v',
'ip_camera', 'ip_camera_v',
'diverter', 'diverter_v',
'epc', 'epc_v',
]); ]);
const visible = layout.symbols.filter(s => !s.hidden && !layout.hiddenGroups.has(getSymbolGroup(s.symbolId))); const visible = layout.symbols.filter(s => !s.hidden && !layout.hiddenGroups.has(getSymbolGroup(s.symbolId)));