testing to understand why it does not work on iOS
This commit is contained in:
parent
22cd6f5115
commit
c45433c8db
@ -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…
x
Reference in New Issue
Block a user