mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
clear selection from copied/duplicatated group (#1973)
Co-authored-by: rene_mbp <harryloveslearning@googlemail.com> Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
c06988a202
commit
403e8bd307
4 changed files with 47 additions and 29 deletions
|
@ -956,19 +956,25 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
y: element.y + dy - minY,
|
||||
});
|
||||
});
|
||||
|
||||
this.scene.replaceAllElements([
|
||||
...this.scene.getElementsIncludingDeleted(),
|
||||
...newElements,
|
||||
]);
|
||||
history.resumeRecording();
|
||||
this.setState({
|
||||
isLibraryOpen: false,
|
||||
selectedElementIds: newElements.reduce((map, element) => {
|
||||
map[element.id] = true;
|
||||
return map;
|
||||
}, {} as any),
|
||||
});
|
||||
this.setState(
|
||||
selectGroupsForSelectedElements(
|
||||
{
|
||||
...this.state,
|
||||
isLibraryOpen: false,
|
||||
selectedElementIds: newElements.reduce((map, element) => {
|
||||
map[element.id] = true;
|
||||
return map;
|
||||
}, {} as any),
|
||||
selectedGroupIds: {},
|
||||
},
|
||||
this.scene.getElements(),
|
||||
),
|
||||
);
|
||||
};
|
||||
|
||||
private addTextFromPaste(text: any) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue