fix(network): persist group node type, size, and child parentId on save/load
Backend DiagramNode schema was missing nodeType, style, and parentId fields — Pydantic stripped them on save, so group nodes lost their identity on reload and re-appeared as small device icons. - Backend: add nodeType, style (NodeStyle), parentId to DiagramNode schema - Frontend: serialize parentId for device nodes inside groups - Frontend: restore parentId + extent:'parent' on both deserializer paths (setNodes + history init) - Frontend: add parentId to DiagramNode interface Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ export interface DiagramNode {
|
||||
properties: DeviceProperties
|
||||
nodeType?: string
|
||||
style?: { width?: number; height?: number } | null
|
||||
parentId?: string | null
|
||||
}
|
||||
|
||||
export interface DiagramEdge {
|
||||
|
||||
Reference in New Issue
Block a user