Skip to content

Commit 8b03f4e

Browse files
committed
fix text bounds being scaled twice
1 parent b1ebd0e commit 8b03f4e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

engine/entity/entities/rich-text.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ export class RichText extends PixiEntity {
216216
this.#text.anchor.set(anchor, 0.5);
217217

218218
const localBounds = this.container.getLocalBounds().rectangle;
219+
localBounds.scale(1 / this.globalTransform.scale.x, 1 / this.globalTransform.scale.y);
219220
const width = localBounds.width;
220221
const height = localBounds.height;
221222
const x = localBounds.x + width / 2;

0 commit comments

Comments
 (0)