mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: cursor being leaked outside of canvas (#3161)
This commit is contained in:
parent
f295ba98c5
commit
c77c9ce65a
8 changed files with 69 additions and 52 deletions
|
@ -151,10 +151,12 @@ const LIBRARY_ICON = (
|
|||
);
|
||||
|
||||
export const ShapesSwitcher = ({
|
||||
canvas,
|
||||
elementType,
|
||||
setAppState,
|
||||
isLibraryOpen,
|
||||
}: {
|
||||
canvas: HTMLCanvasElement | null;
|
||||
elementType: ExcalidrawElement["type"];
|
||||
setAppState: React.Component<any, AppState>["setState"];
|
||||
isLibraryOpen: boolean;
|
||||
|
@ -185,7 +187,7 @@ export const ShapesSwitcher = ({
|
|||
multiElement: null,
|
||||
selectedElementIds: {},
|
||||
});
|
||||
setCursorForShape(value);
|
||||
setCursorForShape(canvas, value);
|
||||
setAppState({});
|
||||
}}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue