mirror of
https://github.com/hexastack/hexabot
synced 2025-02-22 20:38:32 +00:00
fix: remove links when duplicating a block
This commit is contained in:
parent
5e6f867e49
commit
71462facb8
@ -203,13 +203,23 @@ const Diagrams = () => {
|
||||
if (!block) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
attachedBlock: _attachedBlock,
|
||||
nextBlocks: _nextBlocks,
|
||||
previousBlocks: _previousBlocks,
|
||||
id: _id,
|
||||
createdAt: _createdAt,
|
||||
updatedAt: _updatedAt,
|
||||
position,
|
||||
...duplicateBlockDto
|
||||
} = block;
|
||||
|
||||
duplicateBlock({
|
||||
...block,
|
||||
...duplicateBlockDto,
|
||||
name: `${block.name} (Copy)`,
|
||||
position: {
|
||||
x: block.position.x + 100,
|
||||
y: block.position.y + 100,
|
||||
x: position.x + 100,
|
||||
y: position.y + 100,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user