mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
testing to understand why it does not work on iOS
This commit is contained in:
parent
22cd6f5115
commit
c45433c8db
1 changed files with 2 additions and 1 deletions
|
@ -197,6 +197,7 @@ export const ShapesSwitcher = ({
|
||||||
penDetected: boolean;
|
penDetected: boolean;
|
||||||
setDeviceType: (obj: Partial<DeviceType>) => void;
|
setDeviceType: (obj: Partial<DeviceType>) => void;
|
||||||
}) => {
|
}) => {
|
||||||
|
const pd = useDeviceType().penDetected;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{SHAPES.map(({ value, icon, key }, index) => {
|
{SHAPES.map(({ value, icon, key }, index) => {
|
||||||
|
@ -219,7 +220,7 @@ export const ShapesSwitcher = ({
|
||||||
aria-keyshortcuts={shortcut}
|
aria-keyshortcuts={shortcut}
|
||||||
data-testid={value}
|
data-testid={value}
|
||||||
onChange={({ pointerType }) => {
|
onChange={({ pointerType }) => {
|
||||||
if (!penDetected && pointerType === "pen") {
|
if (!pd && pointerType === "pen") {
|
||||||
setAppState({ penMode: true });
|
setAppState({ penMode: true });
|
||||||
setDeviceType({ penDetected: true });
|
setDeviceType({ penDetected: true });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue