mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-23 18:26:54 +02:00
Update utils.ts
This commit is contained in:
@@ -148,7 +148,7 @@ export const throttleRAF = <T extends any[]>(
|
|||||||
scheduleFunc(lastArgs);
|
scheduleFunc(lastArgs);
|
||||||
}
|
}
|
||||||
if (watchdog) {
|
if (watchdog) {
|
||||||
clearTimout(watchdog);
|
clearTimeout(watchdog);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -170,7 +170,7 @@ export const throttleRAF = <T extends any[]>(
|
|||||||
cancelAnimationFrame(timerId);
|
cancelAnimationFrame(timerId);
|
||||||
timerId = null;
|
timerId = null;
|
||||||
if (watchdog) {
|
if (watchdog) {
|
||||||
clearTimout(watchdog);
|
clearTimeout(watchdog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lastArgs) {
|
if (lastArgs) {
|
||||||
@@ -184,7 +184,7 @@ export const throttleRAF = <T extends any[]>(
|
|||||||
cancelAnimationFrame(timerId);
|
cancelAnimationFrame(timerId);
|
||||||
timerId = null;
|
timerId = null;
|
||||||
if (watchdog) {
|
if (watchdog) {
|
||||||
clearTimout(watchdog);
|
clearTimeout(watchdog);
|
||||||
watchdog = null;
|
watchdog = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user