From 9f880395da3834f906a5f1178e3a8910182cb0db Mon Sep 17 00:00:00 2001 From: findthelorax Date: Sun, 19 Apr 2026 23:52:36 -0400 Subject: [PATCH] fix: adjusted deserialize for all virtualization node types --- frontend/src/utils/canvasSerializer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/utils/canvasSerializer.ts b/frontend/src/utils/canvasSerializer.ts index 02d4fcf..562c400 100644 --- a/frontend/src/utils/canvasSerializer.ts +++ b/frontend/src/utils/canvasSerializer.ts @@ -157,11 +157,11 @@ export function deserializeApiNode( position: { x: n.pos_x, y: n.pos_y }, data: { ...n, type: normalizedType } as unknown as NodeData, ...(n.parent_id && parentIsContainer ? { parentId: n.parent_id, extent: 'parent' as const } : {}), - ...(normalizedType === 'proxmox' && n.container_mode !== false + ...(['proxmox', 'vm', 'lxc', 'docker_host'].includes(normalizedType) && n.container_mode !== false ? { width: n.width ?? 300, height: n.height ?? 200 } : {}), - ...(n.width && normalizedType !== 'proxmox' ? { width: n.width } : {}), - ...(n.height && normalizedType !== 'proxmox' ? { height: n.height } : {}), + ...(n.width && !['proxmox', 'vm', 'lxc', 'docker_host'].includes(normalizedType) ? { width: n.width } : {}), + ...(n.height && !['proxmox', 'vm', 'lxc', 'docker_host'].includes(normalizedType) ? { height: n.height } : {}), } }