Fix alt-duplicate (#326)
We need to unselect all the previous elements and select all the new ones. Also made sure that the shape is regenerated when the element is duplicated
This commit is contained in:
@@ -37,6 +37,7 @@ export function newElement(
|
||||
|
||||
export function duplicateElement(element: ReturnType<typeof newElement>) {
|
||||
const copy = { ...element };
|
||||
delete copy.shape;
|
||||
copy.id = nanoid();
|
||||
copy.seed = randomSeed();
|
||||
return copy;
|
||||
|
||||
Reference in New Issue
Block a user