mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-20 07:49:59 +02:00
chore: Attempt filtering new set state
This commit is contained in:
@@ -492,10 +492,9 @@ export class LinearElementEditor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...app.state,
|
|
||||||
selectedLinearElement: newLinearElementEditor,
|
selectedLinearElement: newLinearElementEditor,
|
||||||
suggestedBindings,
|
suggestedBindings,
|
||||||
};
|
} as Pick<AppState, keyof AppState>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@@ -8697,7 +8697,22 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
pointerDownState.lastCoords.y = y;
|
pointerDownState.lastCoords.y = y;
|
||||||
pointerDownState.drag.hasOccurred = true;
|
pointerDownState.drag.hasOccurred = true;
|
||||||
|
|
||||||
this.setState(newState);
|
if (
|
||||||
|
!isShallowEqual(
|
||||||
|
newState.suggestedBindings ?? [],
|
||||||
|
this.state.suggestedBindings,
|
||||||
|
) ||
|
||||||
|
!isShallowEqual(
|
||||||
|
newState.selectedLinearElement?.selectedPointsIndices ?? [],
|
||||||
|
this.state.selectedLinearElement?.selectedPointsIndices ?? [],
|
||||||
|
) ||
|
||||||
|
newState.selectedLinearElement?.hoverPointIndex !==
|
||||||
|
this.state.selectedLinearElement?.hoverPointIndex ||
|
||||||
|
newState.selectedLinearElement?.customLineAngle !==
|
||||||
|
this.state.selectedLinearElement?.customLineAngle
|
||||||
|
) {
|
||||||
|
this.setState(newState);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user