fix font being reset to current state font on edit (#1282)

This commit is contained in:
David Luzar 2020-04-06 22:26:00 +02:00 committed by GitHub
parent 1a5048195a
commit d3ed5a42fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1190,11 +1190,10 @@ export class App extends React.Component<any, AppState> {
...globalSceneState.getAllElements().map((_element) => {
if (_element.id === element.id) {
return newTextElement({
..._element,
...(_element as ExcalidrawTextElement),
x: element.x,
y: element.y,
text,
font: this.state.currentItemFont,
});
}
return _element;