feat: expose app instance on excalidrawAPI
This commit is contained in:
parent
7dbd0c5e0a
commit
a834a4fda0
@ -332,6 +332,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
importLibrary: this.importLibraryFromUrl,
|
||||
setToastMessage: this.setToastMessage,
|
||||
id: this.id,
|
||||
app: this,
|
||||
} as const;
|
||||
if (typeof excalidrawRef === "function") {
|
||||
excalidrawRef(api);
|
||||
|
@ -378,4 +378,5 @@ export type ExcalidrawImperativeAPI = {
|
||||
readyPromise: ResolvablePromise<ExcalidrawImperativeAPI>;
|
||||
ready: true;
|
||||
id: string;
|
||||
app: InstanceType<typeof App>;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user