mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix restoring appState (#2182)
This commit is contained in:
parent
b2822f3538
commit
adb1ac5788
8 changed files with 74 additions and 49 deletions
|
@ -3927,7 +3927,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
this.setState({ shouldCacheIgnoreZoom: false });
|
||||
}, 300);
|
||||
|
||||
private getCanvasOffsets() {
|
||||
private getCanvasOffsets(): Pick<AppState, "offsetTop" | "offsetLeft"> {
|
||||
if (this.excalidrawRef?.current) {
|
||||
const parentElement = this.excalidrawRef.current.parentElement;
|
||||
const { left, top } = parentElement.getBoundingClientRect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue