diff --git a/src/components/App.tsx b/src/components/App.tsx index 6814d273..ea7c73ab 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -2066,7 +2066,7 @@ class App extends React.Component { /** whether to attempt to insert at element center if applicable */ insertAtParentCenter?: boolean; }) => { - const parentCenterPosition = + let parentCenterPosition = insertAtParentCenter && this.getTextWysiwygSnappedToCenterPosition( sceneX, @@ -2111,6 +2111,15 @@ class App extends React.Component { mutateElement(container, { height: newHeight, width: newWidth }); sceneX = container.x + newWidth / 2; sceneY = container.y + newHeight / 2; + if (parentCenterPosition) { + parentCenterPosition = this.getTextWysiwygSnappedToCenterPosition( + sceneX, + sceneY, + this.state, + this.canvas, + window.devicePixelRatio, + ); + } } const element = existingTextElement