mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
debug
This commit is contained in:
parent
f994e5d71d
commit
f77975cee5
2 changed files with 5 additions and 15 deletions
|
@ -1361,6 +1361,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
document.querySelector(".excalidraw")!,
|
||||
).getPropertyValue("--color-selection");
|
||||
|
||||
if(!this.state.shouldCacheIgnoreZoom) console.log(`renderScene`);
|
||||
renderScene(
|
||||
{
|
||||
elements: renderingElements,
|
||||
|
@ -1386,23 +1387,19 @@ class App extends React.Component<AppProps, AppState> {
|
|||
renderScrollbars: !this.device.isMobile,
|
||||
},
|
||||
callback: ({ atLeastOneVisibleElement, scrollBars }) => {
|
||||
if(!this.state.shouldCacheIgnoreZoom) console.log(`callback 1`);
|
||||
if (scrollBars) {
|
||||
currentScrollBars = scrollBars;
|
||||
}
|
||||
if(!this.state.shouldCacheIgnoreZoom) console.log(`callback 2`);
|
||||
const scrolledOutside =
|
||||
// hide when editing text
|
||||
isTextElement(this.state.editingElement)
|
||||
? false
|
||||
: !atLeastOneVisibleElement && renderingElements.length > 0;
|
||||
if(!this.state.shouldCacheIgnoreZoom) console.log(`callback 3`, scrolledOutside, this.state.scrolledOutside);
|
||||
if (this.state.scrolledOutside !== scrolledOutside) {
|
||||
this.setState({ scrolledOutside });
|
||||
}
|
||||
if(!this.state.shouldCacheIgnoreZoom) console.log(`callback 4`);
|
||||
//this.scheduleImageRefresh();
|
||||
if(!this.state.shouldCacheIgnoreZoom) console.log(`callback 5`);
|
||||
this.scheduleImageRefresh();
|
||||
if(!this.state.shouldCacheIgnoreZoom) setTimeout(()=>console.log(`after renderScene`));
|
||||
},
|
||||
},
|
||||
THROTTLE_NEXT_RENDER && window.EXCALIDRAW_THROTTLE_RENDER === true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue