mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: throttle pointermove
events per framerate (#4727)
This commit is contained in:
parent
96de887cc8
commit
8aff076782
3 changed files with 75 additions and 6 deletions
|
@ -20,7 +20,7 @@ import { LinearElementEditor } from "./element/linearElementEditor";
|
|||
import { SuggestedBinding } from "./element/binding";
|
||||
import { ImportedDataState } from "./data/types";
|
||||
import type App from "./components/App";
|
||||
import type { ResolvablePromise } from "./utils";
|
||||
import type { ResolvablePromise, throttleRAF } from "./utils";
|
||||
import { Spreadsheet } from "./charts";
|
||||
import { Language } from "./i18n";
|
||||
import { ClipboardData } from "./clipboard";
|
||||
|
@ -367,7 +367,7 @@ export type PointerDownState = Readonly<{
|
|||
// We need to have these in the state so that we can unsubscribe them
|
||||
eventListeners: {
|
||||
// It's defined on the initial pointer down event
|
||||
onMove: null | ((event: PointerEvent) => void);
|
||||
onMove: null | ReturnType<typeof throttleRAF>;
|
||||
// It's defined on the initial pointer down event
|
||||
onUp: null | ((event: PointerEvent) => void);
|
||||
// It's defined on the initial pointer down event
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue