feat: support props.activeTool

This commit is contained in:
dwelle
2023-10-05 18:17:46 +02:00
parent 2e61926a6b
commit c199686c05
4 changed files with 34 additions and 1 deletions

View File

@@ -1903,6 +1903,13 @@ class App extends React.Component<AppProps, AppState> {
this.refreshDeviceState(this.excalidrawContainerRef.current);
}
if (
this.props.activeTool &&
this.props.activeTool.type !== this.state.activeTool.type
) {
this.setActiveTool(this.props.activeTool);
}
if (
prevState.scrollX !== this.state.scrollX ||
prevState.scrollY !== this.state.scrollY