mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 04:48:51 +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) {
|
if (!block) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const {
|
||||||
|
attachedBlock: _attachedBlock,
|
||||||
|
nextBlocks: _nextBlocks,
|
||||||
|
previousBlocks: _previousBlocks,
|
||||||
|
id: _id,
|
||||||
|
createdAt: _createdAt,
|
||||||
|
updatedAt: _updatedAt,
|
||||||
|
position,
|
||||||
|
...duplicateBlockDto
|
||||||
|
} = block;
|
||||||
|
|
||||||
duplicateBlock({
|
duplicateBlock({
|
||||||
...block,
|
...duplicateBlockDto,
|
||||||
name: `${block.name} (Copy)`,
|
name: `${block.name} (Copy)`,
|
||||||
position: {
|
position: {
|
||||||
x: block.position.x + 100,
|
x: position.x + 100,
|
||||||
y: block.position.y + 100,
|
y: position.y + 100,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user