Add touch support (#788)
* Add touch support * Mock media query * Mock media query pt 2 * Fix tests * Allow installing as an app on iOS * Fix type error * Math.hypot * delete and finalize buttons, hint viewer * skip failing tests * skip the rest of the failing tests * Hide the selected shape actions when nothing is selected * Don’t go into mobile view on short-but-wide viewports * lol
This commit is contained in:
13
src/types.ts
13
src/types.ts
@ -33,3 +33,16 @@ export type AppState = {
|
||||
zoom: number;
|
||||
openedMenu: "canvas" | "shape" | null;
|
||||
};
|
||||
|
||||
export type Pointer = Readonly<{
|
||||
id: number;
|
||||
x: number;
|
||||
y: number;
|
||||
}>;
|
||||
|
||||
export type Gesture = {
|
||||
pointers: Array<Pointer>;
|
||||
lastCenter: { x: number; y: number } | null;
|
||||
initialDistance: number | null;
|
||||
initialScale: number | null;
|
||||
};
|
||||
|
Reference in New Issue
Block a user