调整行为树保存信息
This commit is contained in:
@@ -85,6 +85,7 @@ import { createTree, findOneTreeById, findOneTreeByPlatformId, updateTree, findS
|
||||
import TressCard from './trees-card.vue';
|
||||
import ScenariosCard from './scenarios-card.vue';
|
||||
import NodesCard from './nodes-card.vue';
|
||||
import { generateKey } from '@/utils/strings';
|
||||
|
||||
const TeleportContainer = defineComponent(getTeleport());
|
||||
|
||||
@@ -317,6 +318,7 @@ export default defineComponent({
|
||||
// 将节点添加到画布
|
||||
graph.value?.addNode(node as Node);
|
||||
});
|
||||
fitToScreen();
|
||||
}
|
||||
if (currentBehaviorTree.value?.graph.edges) {
|
||||
// 然后添加所有边,确保包含桩点信息
|
||||
@@ -376,10 +378,11 @@ export default defineComponent({
|
||||
id: 0,
|
||||
name: '行为树',
|
||||
description: null,
|
||||
englishName: null,
|
||||
englishName: generateKey('scenario'),
|
||||
xmlContent: null,
|
||||
createdAt: null,
|
||||
platformId: currentPlatformId.value,
|
||||
scenarioId: currentScenarioId.value,
|
||||
graph: {
|
||||
edges: [],
|
||||
nodes: [],
|
||||
|
||||
Reference in New Issue
Block a user