mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix an issue in change property that was causing elements to be removed
This commit is contained in:
parent
ccb886730b
commit
b35a0b5041
1 changed files with 5 additions and 4 deletions
|
@ -309,11 +309,12 @@ export class App extends React.Component<{}, AppState> {
|
|||
private changeProperty = (
|
||||
callback: (element: ExcalidrawElement) => ExcalidrawElement
|
||||
) => {
|
||||
elements = elements
|
||||
.filter(el => el.isSelected)
|
||||
.map(element => {
|
||||
elements = elements.map(element => {
|
||||
if (element.isSelected) {
|
||||
return callback(element);
|
||||
});
|
||||
}
|
||||
return element;
|
||||
});
|
||||
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue