workflow底层UI库整合至项目,优化构建逻辑

This commit is contained in:
2026-02-24 11:20:18 +08:00
parent 094b185c49
commit 12accb2575
91 changed files with 6820 additions and 115 deletions

View File

@@ -0,0 +1,22 @@
import {store} from '#store/stores.svelte';
export const useGetNodeRelativePosition = () => {
const getNodeRelativePosition = (parentNodeId: string) => {
let node = store.getNode(parentNodeId);
const position = { x: 0, y: 0 };
while (node) {
position.x += node.position.x;
position.y += node.position.y;
if (node.parentId) {
node = store.getNode(node.parentId);
} else {
node = undefined;
}
}
return position;
};
return {
getNodeRelativePosition
};
};