aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/InteractionUtils.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-16 22:35:44 -0500
committerbobzel <zzzman@gmail.com>2020-12-16 22:35:44 -0500
commit5bbc8dfe46a7bb2a9e1b09a4d67ed68a7533ab78 (patch)
tree00c3b4a5ae8124b7dbe1ea075ee6ee1f89bdfdb2 /src/client/util/InteractionUtils.tsx
parent0fbfb06c499d2ee52b086427cbf1c5431fadfad9 (diff)
cleaned up removing frame animation fields
Diffstat (limited to 'src/client/util/InteractionUtils.tsx')
-rw-r--r--src/client/util/InteractionUtils.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/util/InteractionUtils.tsx b/src/client/util/InteractionUtils.tsx
index f58277717..01d00db30 100644
--- a/src/client/util/InteractionUtils.tsx
+++ b/src/client/util/InteractionUtils.tsx
@@ -364,12 +364,9 @@ export namespace InteractionUtils {
export function IsType(e: PointerEvent | React.PointerEvent, type: string): boolean {
switch (type) {
// pen and eraser are both pointer type 'pen', but pen is button 0 and eraser is button 5. -syip2
- case PENTYPE:
- return e.pointerType === PENTYPE && (e.button === -1 || e.button === 0);
- case ERASERTYPE:
- return e.pointerType === PENTYPE && e.button === (e instanceof PointerEvent ? ERASER_BUTTON : ERASER_BUTTON);
- default:
- return e.pointerType === type;
+ case PENTYPE: return e.pointerType === PENTYPE && (e.button === -1 || e.button === 0);
+ case ERASERTYPE: return e.pointerType === PENTYPE && e.button === (e instanceof PointerEvent ? ERASER_BUTTON : ERASER_BUTTON);
+ default: return e.pointerType === type;
}
}