Update PE default size to 46x14 to match reference layout

Also add previous 30x14 default to migration table so existing
PEs at either old size get updated on load.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
igurielidze 2026-03-30 18:01:08 +04:00
parent 271f646e1d
commit b68622a63a
2 changed files with 4 additions and 4 deletions

View File

@ -6,8 +6,8 @@ const DEFAULT_SIZES = new Map(SYMBOLS.map(s => [s.id, { w: s.w, h: s.h }]));
/** Known outdated defaults: symbolId → [{oldW, oldH}] */ /** Known outdated defaults: symbolId → [{oldW, oldH}] */
const OUTDATED_SIZES: Record<string, { w: number; h: number }[]> = { const OUTDATED_SIZES: Record<string, { w: number; h: number }[]> = {
photoeye: [{ w: 56, h: 20 }], photoeye: [{ w: 56, h: 20 }, { w: 30, h: 14 }],
photoeye_v: [{ w: 56, h: 20 }], photoeye_v: [{ w: 56, h: 20 }, { w: 30, h: 14 }],
}; };
/** JSON shape stored in localStorage / exported JSON files */ /** JSON shape stored in localStorage / exported JSON files */

View File

@ -36,8 +36,8 @@ export const SYMBOLS: SymbolDef[] = [
{ id: 'fio_sio_fioh_v', name: 'FIO/SIO/FIOH (V)', file: '/symbols/fio_sio_fioh.svg', w: 14, h: 20, defaultRotation: 90, group: 'I/O Modules' }, { id: 'fio_sio_fioh_v', name: 'FIO/SIO/FIOH (V)', file: '/symbols/fio_sio_fioh.svg', w: 14, h: 20, defaultRotation: 90, group: 'I/O Modules' },
// --- Sensors --- // --- Sensors ---
{ id: 'photoeye', name: 'Photoeye', file: '/symbols/photoeye.svg', w: 30, h: 14, group: 'Sensors' }, { id: 'photoeye', name: 'Photoeye', file: '/symbols/photoeye.svg', w: 46, h: 14, group: 'Sensors' },
{ id: 'photoeye_v', name: 'Photoeye (V)', file: '/symbols/photoeye.svg', w: 30, h: 14, defaultRotation: 90, group: 'Sensors' }, { id: 'photoeye_v', name: 'Photoeye (V)', file: '/symbols/photoeye.svg', w: 46, h: 14, defaultRotation: 90, group: 'Sensors' },
{ id: 'pressure_sensor', name: 'Pressure Sensor', file: '/symbols/pressure_sensor.svg', w: 20, h: 20, group: 'Sensors' }, { id: 'pressure_sensor', name: 'Pressure Sensor', file: '/symbols/pressure_sensor.svg', w: 20, h: 20, group: 'Sensors' },
{ id: 'pressure_sensor_v', name: 'Pressure Sensor (V)', file: '/symbols/pressure_sensor.svg', w: 20, h: 20, defaultRotation: 90, group: 'Sensors' }, { id: 'pressure_sensor_v', name: 'Pressure Sensor (V)', file: '/symbols/pressure_sensor.svg', w: 20, h: 20, defaultRotation: 90, group: 'Sensors' },