iOS debug

This commit is contained in:
Zsolt Viczian 2022-03-21 18:14:02 +01:00
parent bb04943564
commit 563caa3f07
2 changed files with 4 additions and 1 deletions

View File

@ -217,12 +217,14 @@ export const ShapesSwitcher = ({
aria-label={capitalizeString(label)}
aria-keyshortcuts={shortcut}
data-testid={value}
onChange={({ pointerType }) => {
onPointerDown={({ pointerType }) => {
setAppState({ toastMessage: pointerType }); //debug iOS
if (!penDetected && pointerType === "pen") {
setAppState({ penMode: true });
setDeviceType({ penDetected: true });
}
}}
onChange={({ pointerType }) => {
setAppState({
elementType: value,
multiElement: null,

View File

@ -48,6 +48,7 @@ type ToolButtonProps =
type: "radio";
checked: boolean;
onChange?(data: { pointerType: PointerType | null }): void;
onPointerDown?(data: { pointerType: PointerType }): void;
});
export const ToolButton = React.forwardRef((props: ToolButtonProps, ref) => {