Skip to content

Fix rotated text anchoring when content changes#8600

Open
tmchang1258 wants to merge 3 commits into
4ian:masterfrom
tmchang1258:fix-rotated-text-anchoring
Open

Fix rotated text anchoring when content changes#8600
tmchang1258 wants to merge 3 commits into
4ian:masterfrom
tmchang1258:fix-rotated-text-anchoring

Conversation

@tmchang1258
Copy link
Copy Markdown

Fixes #975

Rysolv bounty: https://rysolv.com/issues/detail/578eaa07-7f66-4d18-a2ea-d68e852c1621

Summary

  • Anchor regular Text, BBText, and Bitmap Text renderers around the object origin instead of the rendered center that changes with text width.
  • Preserve horizontal alignment offsets for wrapped text while keeping the rotation pivot stable.
  • Align editor renderer center calculations with the runtime pivot/hitbox behavior.
  • Add a Pixi runtime regression test for rotated text staying anchored after content changes.

Validation

  • npm run build from GDJS
  • npm run check-types from GDJS
  • npm run test:chromeHeadlessNoSandbox from GDJS/tests (1182 executed, 12 skipped, success)
  • npx prettier --check on the touched source and test files
  • git diff --check

Note

npm run check-format currently reports many pre-existing formatting differences across the repo. The files touched in this PR pass a targeted Prettier check.

@tmchang1258 tmchang1258 requested a review from 4ian as a code owner May 13, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[$5 bounty] Text object at wrong position (and moves!)

1 participant