mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Make clearSelection
return a new array
This commit is contained in:
parent
332fc518b7
commit
a7df901946
1 changed files with 4 additions and 2 deletions
|
@ -30,11 +30,13 @@ export function setSelection(
|
|||
}
|
||||
|
||||
export function clearSelection(elements: readonly ExcalidrawElement[]) {
|
||||
elements.forEach(element => {
|
||||
const newElements = [...elements];
|
||||
|
||||
newElements.forEach(element => {
|
||||
element.isSelected = false;
|
||||
});
|
||||
|
||||
return elements;
|
||||
return newElements;
|
||||
}
|
||||
|
||||
export function deleteSelectedElements(elements: readonly ExcalidrawElement[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue