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 = (
|
private changeProperty = (
|
||||||
callback: (element: ExcalidrawElement) => ExcalidrawElement
|
callback: (element: ExcalidrawElement) => ExcalidrawElement
|
||||||
) => {
|
) => {
|
||||||
elements = elements
|
elements = elements.map(element => {
|
||||||
.filter(el => el.isSelected)
|
if (element.isSelected) {
|
||||||
.map(element => {
|
|
||||||
return callback(element);
|
return callback(element);
|
||||||
});
|
}
|
||||||
|
return element;
|
||||||
|
});
|
||||||
|
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue