mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
perf: Limiting the suggested binding to fix performance issue (#6877)
This commit is contained in:
parent
2b14a5c233
commit
c29f19a88b
1 changed files with 3 additions and 0 deletions
|
@ -7379,6 +7379,9 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
private maybeSuggestBindingForAll(
|
private maybeSuggestBindingForAll(
|
||||||
selectedElements: NonDeleted<ExcalidrawElement>[],
|
selectedElements: NonDeleted<ExcalidrawElement>[],
|
||||||
): void {
|
): void {
|
||||||
|
if (selectedElements.length > 50) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const suggestedBindings = getEligibleElementsForBinding(selectedElements);
|
const suggestedBindings = getEligibleElementsForBinding(selectedElements);
|
||||||
this.setState({ suggestedBindings });
|
this.setState({ suggestedBindings });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue