From 3f11ca0a443a7d6697bcdaed4799e56de5b775d4 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Tue, 4 Apr 2023 18:47:35 +0200 Subject: [PATCH] debug --- src/components/App.tsx | 14 +++++++------- src/utils.ts | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 765049f30..001f065bf 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1361,10 +1361,10 @@ class App extends React.Component { document.querySelector(".excalidraw")!, ).getPropertyValue("--color-selection"); - const now = Date.now(); - if (!this.state.shouldCacheIgnoreZoom) { - console.log(`renderScene`, now); - } + //const now = Date.now(); + //if (!this.state.shouldCacheIgnoreZoom) { + // console.log(`renderScene`, now); + //} renderScene( { elements: renderingElements, @@ -1402,9 +1402,9 @@ class App extends React.Component { this.setState({ scrolledOutside }); } this.scheduleImageRefresh(); - if (!this.state.shouldCacheIgnoreZoom) { - setTimeout(() => console.log(`after renderScene`, now)); - } + //if (!this.state.shouldCacheIgnoreZoom) { + // setTimeout(() => console.log(`after renderScene`, now)); + //} }, }, true || diff --git a/src/utils.ts b/src/utils.ts index f616b15ac..9946071dd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -140,12 +140,12 @@ export const throttleRAF = ( const scheduleFunc = (args: T) => { timerId = window.requestAnimationFrame(() => { timerId = null; - console.log("start render in animation frame"); + //console.log("start render in animation frame"); fn(...args); - console.log("render done in animation frame"); + //console.log("render done in animation frame"); lastArgs = null; if (lastArgsTrailing) { - console.log("last args trailing", lastArgsTrailing); + //console.log("last args trailing", lastArgsTrailing); lastArgs = lastArgsTrailing; lastArgsTrailing = null; scheduleFunc(lastArgs);