fix(editor): restore stable map editing behavior

This commit is contained in:
Tom Boullay
2026-05-29 00:52:44 +02:00
parent d5675fe82c
commit 343a122c06
28 changed files with 453 additions and 302 deletions
+2
View File
@@ -23,6 +23,7 @@ function isMapNode(value: unknown): value is MapNode {
}
return (
(value.id === undefined || typeof value.id === "string") &&
typeof value.name === "string" &&
typeof value.type === "string" &&
isVector3Tuple(value.position) &&
@@ -53,6 +54,7 @@ function isHierarchicalMapNode(value: unknown): value is HierarchicalMapNode {
function flattenMapNode(node: HierarchicalMapNode, path: number[]): MapNode[] {
const mapNode: MapNode = {
...(node.id ? { id: node.id } : {}),
name: node.name,
type: node.type,
position: node.position,