Greatly simplifies shapes
This commit is contained in:
parent
32082492d1
commit
3d52d9e9d2
18 changed files with 438 additions and 610 deletions
|
@ -844,12 +844,14 @@ export async function postJsonToEndpoint(
|
|||
return await d.json()
|
||||
}
|
||||
|
||||
export function getPointerEventInfo(e: React.PointerEvent | WheelEvent) {
|
||||
export function getPointerEventInfo(
|
||||
e: PointerEvent | React.PointerEvent | WheelEvent
|
||||
) {
|
||||
const { shiftKey, ctrlKey, metaKey, altKey } = e
|
||||
return { point: [e.clientX, e.clientY], shiftKey, ctrlKey, metaKey, altKey }
|
||||
}
|
||||
|
||||
export function getKeyboardEventInfo(e: React.KeyboardEvent | KeyboardEvent) {
|
||||
export function getKeyboardEventInfo(e: KeyboardEvent | React.KeyboardEvent) {
|
||||
const { shiftKey, ctrlKey, metaKey, altKey } = e
|
||||
return { key: e.key, shiftKey, ctrlKey, metaKey, altKey }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue