mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update utils.ts
This commit is contained in:
parent
87e6638e9e
commit
c4738b31fb
1 changed files with 3 additions and 3 deletions
|
@ -135,7 +135,7 @@ export const throttleRAF = <T extends any[]>(
|
|||
let timerId: number | null = null;
|
||||
let lastArgs: T | null = null;
|
||||
let lastArgsTrailing: T | null = null;
|
||||
let watchdog: NodeJS.Timeout | null = null;
|
||||
let watchdog: number | null = null;
|
||||
|
||||
const scheduleFunc = (args: T) => {
|
||||
timerId = window.requestAnimationFrame(() => {
|
||||
|
@ -189,7 +189,7 @@ export const throttleRAF = <T extends any[]>(
|
|||
}
|
||||
}
|
||||
};
|
||||
watchdog = setTimeout(() => {
|
||||
watchdog = window.setTimeout(() => {
|
||||
console.log("watchdog", timerId);
|
||||
if (timerId !== null) {
|
||||
cancelAnimationFrame(timerId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue