mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update App.tsx
This commit is contained in:
parent
f5ab3e4e12
commit
4e863e5796
1 changed files with 13 additions and 12 deletions
|
@ -2952,18 +2952,19 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
this.setState({ errorMessage: t("errors.imageToolNotSupported") });
|
this.setState({ errorMessage: t("errors.imageToolNotSupported") });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for (const file of event.clipboardData.files) {
|
||||||
const imageElement = this.createImageElement({ sceneX, sceneY });
|
const imageElement = this.createImageElement({ sceneX, sceneY });
|
||||||
this.insertImageElement(imageElement, file);
|
this.insertImageElement(imageElement, file);
|
||||||
this.initializeImageDimensions(imageElement);
|
this.initializeImageDimensions(imageElement);
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedElementIds: makeNextSelectedElementIds(
|
selectedElementIds: makeNextSelectedElementIds(
|
||||||
{
|
{
|
||||||
[imageElement.id]: true,
|
[imageElement.id]: true,
|
||||||
},
|
},
|
||||||
this.state,
|
this.state,
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue