Make gesture.pointers a Map instead of an array of pointers (#877)

This commit is contained in:
Pete Hunt 2020-03-08 19:25:16 -07:00 committed by GitHub
parent 92ba401da8
commit 8d8f9f23bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 30 deletions

View file

@ -36,14 +36,13 @@ export type AppState = {
selectedElementIds: { [id: string]: boolean };
};
export type Pointer = Readonly<{
id: number;
export type PointerCoords = Readonly<{
x: number;
y: number;
}>;
export type Gesture = {
pointers: Array<Pointer>;
pointers: Map<number, PointerCoords>;
lastCenter: { x: number; y: number } | null;
initialDistance: number | null;
initialScale: number | null;