fix(canvas): keep container host height when editing an unrelated field
Editing any field on a container-mode vm/lxc/docker_host node (e.g. just renaming it or adding a property) reset its manually-set height to undefined, snapping the container back to auto-fit content size and scrambling/overflowing its nested children. Root cause: updateNode clears height on every 'properties' change and the node modal always includes properties in its payload. Only proxmox was excluded from the reset; vm/lxc/docker_host in container mode were not. - export CONTAINER_MODE_TYPES from virtualEdgeParent (reuse, no re-declare) - updateNode: skip the height reset for any container-mode host type; proxmox stays always-excluded (legacy), plain leaf nodes still auto-fit - regression tests: manual height preserved for container-mode vm/lxc/docker_host and proxmox; still reset for a non-container vm Fixes #278 ha-relevant: yes
This commit is contained in:
@@ -2,7 +2,7 @@ import type { NodeData } from '@/types'
|
||||
|
||||
export type NodeType = NodeData['type']
|
||||
|
||||
const CONTAINER_MODE_TYPES = new Set<NodeType>(['proxmox', 'vm', 'lxc', 'docker_host'])
|
||||
export const CONTAINER_MODE_TYPES = new Set<NodeType>(['proxmox', 'vm', 'lxc', 'docker_host'])
|
||||
const DOCKER_CONTAINER_PARENT_TYPES = new Set<NodeType>(['docker_host', 'lxc', 'vm', 'proxmox'])
|
||||
|
||||
export interface VirtualEdgeEndpoint {
|
||||
|
||||
Reference in New Issue
Block a user