UPDATE: VERSION-20260313

This commit is contained in:
libertyspy
2026-03-13 17:05:08 +08:00
parent a2f2cbb185
commit 7b578f5d63
7 changed files with 96 additions and 54 deletions

View File

@@ -7,12 +7,12 @@
* that was distributed with this source code.
*/
import type { NodeTemplate } from '../types';
import type { NodeDragTemplate } from '../types';
import type { GraphTaskElement, GraphTaskRect } from '../builder/element';
import { generateKey } from '@/utils/strings';
export const createGraphTaskElementFromTemplate = (
template: NodeTemplate,
template: NodeDragTemplate,
rect?: GraphTaskRect,
): GraphTaskElement => {
let realRect = { width: 120, height: 80, x: 0, y: 0, ...rect || {} };
@@ -25,6 +25,7 @@ export const createGraphTaskElementFromTemplate = (
templateType: template.templateType,
name: template.name,
category: template.type,
group: template.group,
description: template.description,
order: 0,
position: {