From d3ed5a42fcca2a28aa4517564d0fba51b81e619a Mon Sep 17 00:00:00 2001 From: David Luzar Date: Mon, 6 Apr 2020 22:26:00 +0200 Subject: [PATCH] fix font being reset to current state font on edit (#1282) --- src/components/App.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 51296814..3ffb6c80 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1190,11 +1190,10 @@ export class App extends React.Component { ...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;