Initial commit
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user