testing to understand why it does not work on iOS

This commit is contained in:
Zsolt Viczian 2022-03-20 19:03:16 +01:00
parent 22cd6f5115
commit c45433c8db

View File

@ -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 });
} }