Initial commit

This commit is contained in:
libertyspy
2026-02-08 16:01:21 +08:00
parent 9ded6b757c
commit c9d5c38b52
11 changed files with 137 additions and 101 deletions

View File

@@ -15,8 +15,8 @@ export const createTaskNodeElementFromTemplate = (
template: NodeTemplate,
rect?: TaskNodeRect,
): SettingTaskNodeElement => {
let realRect = { width: 200, height: 100, x: 0, y: 0, ...rect || {} };
console.info('rect', rect);
let realRect = { width: 200, height: 100, x: 0, y: 0, ...rect || {} }
console.info('rect',rect)
return {
id: 0,
key: generateKey(template.type),
@@ -41,15 +41,15 @@ export const createTaskNodeElementFromTemplate = (
name: '范围',
value: '1000',
defaults: '1000',
unit: 'KM',
unit: 'KM'
},
{
key: generateKey('var_'),
name: '武器名称',
value: '地对空导弹',
defaults: '地对空导弹',
unit: '个',
},
unit: '个'
}
],
} as SettingTaskNodeElement;
};
@@ -135,7 +135,7 @@ export const hasElements = (graph: Graph): boolean => {
return taskElements.length > 0;
}
return false;
};
}
export const hasRootElementNode = (graph: Graph): boolean => {
if (graph) {