mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
unbind onCreate once executed
This commit is contained in:
parent
ba48aa24a0
commit
6eb0cf6a10
1 changed files with 2 additions and 1 deletions
|
@ -453,7 +453,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
height,
|
height,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.scene.addCallback(() => {
|
const unbind = this.scene.addCallback(() => {
|
||||||
const customElementConfig = getCustomElementConfig(
|
const customElementConfig = getCustomElementConfig(
|
||||||
this.props.customElementsConfig,
|
this.props.customElementsConfig,
|
||||||
customElement.customType,
|
customElement.customType,
|
||||||
|
@ -466,6 +466,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
...this.scene.getElementsIncludingDeleted(),
|
...this.scene.getElementsIncludingDeleted(),
|
||||||
customElement,
|
customElement,
|
||||||
]);
|
]);
|
||||||
|
unbind();
|
||||||
};
|
};
|
||||||
|
|
||||||
private renderCanvas() {
|
private renderCanvas() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue