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;
setDeviceType: (obj: Partial<DeviceType>) => void;
}) => {
const pd = useDeviceType().penDetected;
return (
<>
{SHAPES.map(({ value, icon, key }, index) => {
@ -219,7 +220,7 @@ export const ShapesSwitcher = ({
aria-keyshortcuts={shortcut}
data-testid={value}
onChange={({ pointerType }) => {
if (!penDetected && pointerType === "pen") {
if (!pd && pointerType === "pen") {
setAppState({ penMode: true });
setDeviceType({ penDetected: true });
}