diff options
author | Stanley Yip <stanley_yip@brown.edu> | 2020-01-27 19:08:05 -0500 |
---|---|---|
committer | Stanley Yip <stanley_yip@brown.edu> | 2020-01-27 19:08:05 -0500 |
commit | b04bb12a5942d97eef369936e30b36db62b51f30 (patch) | |
tree | 058211fb20189a58b5b19b6295d64a85803b6318 /src/client/util | |
parent | 691d5500c0722d0af9ef3b3ab9036042970e75e9 (diff) |
pen updates
Diffstat (limited to 'src/client/util')
-rw-r--r-- | src/client/util/InteractionUtils.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/util/InteractionUtils.tsx b/src/client/util/InteractionUtils.tsx index 1fe95474c..ad1d1b5de 100644 --- a/src/client/util/InteractionUtils.tsx +++ b/src/client/util/InteractionUtils.tsx @@ -63,7 +63,7 @@ export namespace InteractionUtils { export function GetMyTargetTouches(mte: InteractionUtils.MultiTouchEvent<React.TouchEvent | TouchEvent>, prevPoints: Map<number, React.Touch>, ignorePen: boolean): React.Touch[] { const myTouches = new Array<React.Touch>(); for (const pt of mte.touches) { - if (!ignorePen || (pt.radiusX > 1 && pt.radiusY > 1)) { + if (!ignorePen || ((pt as any).radiusX > 1 && (pt as any).radiusY > 1)) { for (const tPt of mte.targetTouches) { if (tPt?.screenX === pt?.screenX && tPt?.screenY === pt?.screenY) { if (pt && prevPoints.has(pt.identifier)) { @@ -73,6 +73,9 @@ export namespace InteractionUtils { } } } + if (mte.touches.length !== myTouches.length) { + throw Error("opo") + } return myTouches; } |