mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
passing penDetected to ShapesSwitcher
This commit is contained in:
parent
24d7380333
commit
15d88d0fe0
3 changed files with 4 additions and 1 deletions
|
@ -186,14 +186,15 @@ export const ShapesSwitcher = ({
|
|||
setAppState,
|
||||
onImageAction,
|
||||
appState,
|
||||
penDetected,
|
||||
}: {
|
||||
canvas: HTMLCanvasElement | null;
|
||||
elementType: AppState["elementType"];
|
||||
setAppState: React.Component<any, AppState>["setState"];
|
||||
onImageAction: (data: { pointerType: PointerType | null }) => void;
|
||||
appState: AppState;
|
||||
penDetected: boolean;
|
||||
}) => {
|
||||
const penDetected = useDeviceType().penDetected;
|
||||
return (
|
||||
<>
|
||||
{SHAPES.map(({ value, icon, key }, index) => {
|
||||
|
|
|
@ -352,6 +352,7 @@ const LayerUI = ({
|
|||
insertOnCanvasDirectly: pointerType !== "mouse",
|
||||
});
|
||||
}}
|
||||
penDetected={deviceType.penDetected}
|
||||
/>
|
||||
</Stack.Row>
|
||||
</Island>
|
||||
|
|
|
@ -83,6 +83,7 @@ export const MobileMenu = ({
|
|||
insertOnCanvasDirectly: pointerType !== "mouse",
|
||||
});
|
||||
}}
|
||||
penDetected={deviceType.penDetected}
|
||||
/>
|
||||
</Stack.Row>
|
||||
</Island>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue