simplify code
This commit is contained in:
parent
14eecf651f
commit
ae88ea555c
@ -8301,21 +8301,18 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
) {
|
) {
|
||||||
this.maybeSuggestBindingForAll(selectedElements);
|
this.maybeSuggestBindingForAll(selectedElements);
|
||||||
|
|
||||||
// only need to highlight elements in a single resizing frame
|
// highlight frame children ONLY when resizing a single frame
|
||||||
if (resizingSingleFrameOnly) {
|
if (resizingSingleFrameOnly) {
|
||||||
const elementsToHighlight = new Set<ExcalidrawElement>();
|
const selectedFrame = selectedFrames[0];
|
||||||
|
if (selectedFrame) {
|
||||||
selectedFrames.forEach((selectedFrame) => {
|
this.setState({
|
||||||
getElementsInResizingFrame(
|
elementsToHighlight: getElementsInResizingFrame(
|
||||||
this.scene.getNonDeletedElements(),
|
this.scene.getNonDeletedElements(),
|
||||||
selectedFrame,
|
selectedFrame,
|
||||||
this.state,
|
this.state,
|
||||||
).forEach((element) => elementsToHighlight.add(element));
|
),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.setState({
|
|
||||||
elementsToHighlight: [...elementsToHighlight],
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user