feat: shift-clamp when creating multi-point lines/arrows (#5500)

Co-authored-by: Ryan <diweihao@bytedance.com>
This commit is contained in:
Ryan Di 2022-08-01 21:41:50 +08:00 committed by GitHub
parent 426b5d9537
commit 2820cd112e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 2 deletions

View file

@ -80,5 +80,5 @@ export const shouldMaintainAspectRatio = (event: MouseEvent | KeyboardEvent) =>
event.shiftKey;
export const shouldRotateWithDiscreteAngle = (
event: MouseEvent | KeyboardEvent,
event: MouseEvent | KeyboardEvent | React.PointerEvent<HTMLCanvasElement>,
) => event.shiftKey;