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
09a05a4a1c
commit
028ad1ee81
1 changed files with 3 additions and 0 deletions
|
@ -140,9 +140,12 @@ export const throttleRAF = <T extends any[]>(
|
|||
const scheduleFunc = (args: T) => {
|
||||
timerId = window.requestAnimationFrame(() => {
|
||||
timerId = null;
|
||||
console.log("start render in animation frame");
|
||||
fn(...args);
|
||||
console.log("render done in animation frame");
|
||||
lastArgs = null;
|
||||
if (lastArgsTrailing) {
|
||||
console.log("last args trailing", lastArgsTrailing);
|
||||
lastArgs = lastArgsTrailing;
|
||||
lastArgsTrailing = null;
|
||||
scheduleFunc(lastArgs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue