feat: Support shortcut keys to copy nodes #3283 (#3293)

### What problem does this PR solve?

feat: Support shortcut keys to copy nodes #3283

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-11-08 15:50:01 +08:00
committed by GitHub
parent 8b6e272197
commit 63f7d3bae2
5 changed files with 79 additions and 43 deletions

View File

@ -236,8 +236,8 @@ const useGraphStore = create<RFState>()(
const { getNode, addNode, generateNodeName } = get();
const node = getNode(id);
const position = {
x: (node?.position?.x || 0) + 30,
y: (node?.position?.y || 0) + 20,
x: (node?.position?.x || 0) + 50,
y: (node?.position?.y || 0) + 50,
};
addNode({