diff options
author | bobzel <zzzman@gmail.com> | 2020-08-09 11:37:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-09 11:37:55 -0400 |
commit | 4ea8053fdcc2dd8862bd3e5b2995f89c255157a2 (patch) | |
tree | c358b6a83ecb639e3e18e02d0f7ebe0fb0d46613 /src/Utils.ts | |
parent | 9f4a7ec5f79d9dec3a0ffb0b633197216cbefec8 (diff) | |
parent | 3ca9aa0d915e9000f78d528fa59639512f8c4d25 (diff) |
Merge pull request #519 from browngraphicslab/new_audio
New audio
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index 0be27b25d..d9a5353e8 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -547,7 +547,7 @@ export function setupMoveUpEvents( target: object, e: React.PointerEvent, moveEvent: (e: PointerEvent, down: number[], delta: number[]) => boolean, - upEvent: (e: PointerEvent) => void, + upEvent: (e: PointerEvent, movement: number[]) => void, clickEvent: (e: PointerEvent, doubleTap?: boolean) => void, stopPropagation: boolean = true, stopMovePropagation: boolean = true @@ -571,7 +571,7 @@ export function setupMoveUpEvents( const _upEvent = (e: PointerEvent): void => { (target as any)._doubleTap = (Date.now() - (target as any)._lastTap < 300); (target as any)._lastTap = Date.now(); - upEvent(e); + upEvent(e, [e.clientX - (target as any)._downX, e.clientY - (target as any)._downY]); if (Math.abs(e.clientX - (target as any)._downX) < 4 && Math.abs(e.clientY - (target as any)._downY) < 4) { clickEvent(e, (target as any)._doubleTap); } |