Skip to content

Commit d7a2c0a

Browse files
committed
Remove the text alignment workaround.
1 parent a71c481 commit d7a2c0a

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

newIDE/app/src/ObjectsRendering/Renderers/RenderedCustomObjectInstance.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -540,25 +540,6 @@ export default class RenderedCustomObjectInstance extends RenderedInstance {
540540
anchorOrigin * renderedInstance.getDefaultHeight();
541541
}
542542
renderedInstance.update();
543-
544-
if (renderedInstance instanceof RenderedTextInstance) {
545-
// TODO EBO Remove this line when an alignment property is added to the text object.
546-
renderedInstance._pixiObject.style.align = 'center';
547-
}
548-
// This ensure objects are centered if their dimensions changed from the
549-
// custom ones (preferred ones).
550-
// For instance, text object dimensions change according to how the text is wrapped.
551-
if (childLayout.horizontalLayout.anchorOrigin == null) {
552-
childInstance.x =
553-
(width - renderedInstance._pixiObject.width) / 2 +
554-
(childMinX + childMaxX - width) / 2;
555-
}
556-
if (childLayout.verticalLayout.anchorOrigin == null) {
557-
childInstance.y =
558-
(height - renderedInstance._pixiObject.height) / 2 +
559-
(childMinY + childMaxY - height) / 2;
560-
}
561-
renderedInstance.update();
562543
}
563544

564545
this._pixiObject.pivot.x = centerX;

0 commit comments

Comments
 (0)