mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
remove unsafe optimization
This commit is contained in:
parent
2cd8df0fb9
commit
c6fcd3fac4
1 changed files with 1 additions and 10 deletions
|
@ -87,11 +87,7 @@ const StaticCanvas = (props: StaticCanvasProps) => {
|
||||||
return <div className="excalidraw__canvas-wrapper" ref={wrapperRef} />;
|
return <div className="excalidraw__canvas-wrapper" ref={wrapperRef} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getRelevantAppStateProps = (
|
const getRelevantAppStateProps = (appState: AppState): StaticCanvasAppState => {
|
||||||
appState: AppState,
|
|
||||||
):
|
|
||||||
| StaticCanvasAppState
|
|
||||||
| Omit<StaticCanvasAppState, "selectedElementIds" | "activeTool"> => {
|
|
||||||
const relevantAppStateProps = {
|
const relevantAppStateProps = {
|
||||||
zoom: appState.zoom,
|
zoom: appState.zoom,
|
||||||
scrollX: appState.scrollX,
|
scrollX: appState.scrollX,
|
||||||
|
@ -119,11 +115,6 @@ const getRelevantAppStateProps = (
|
||||||
croppingElementId: appState.croppingElementId,
|
croppingElementId: appState.croppingElementId,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (appState.activeTool.type === "lasso") {
|
|
||||||
delete (relevantAppStateProps as Partial<typeof relevantAppStateProps>)
|
|
||||||
.selectedElementIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
return relevantAppStateProps;
|
return relevantAppStateProps;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue