Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: padding issue on text #10498

Merged
merged 1 commit into from
Apr 30, 2024
Merged

Fix: padding issue on text #10498

merged 1 commit into from
Apr 30, 2024

Conversation

GoodBoyDigital
Copy link
Member

Description of change

Fixes #10493 . When clearing the texture for reuse, I was not inclding the padding as part of the area that needed clearing. Easy fix at least!

Pre-Merge Checklist
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 89d8254:

Sandbox Source
pixi.js-sandbox Configuration

context.clearRect(0, 0, measured.width + 4, measured.height + 4);
const padding = style.padding * 2;

context.clearRect(0, 0, measured.width + 4 + padding, measured.height + 4 + padding);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why + 4?

@Zyie Zyie changed the title fix padding issue on text Fix: padding issue on text Apr 30, 2024
@Zyie Zyie added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Apr 30, 2024
@Zyie Zyie added this pull request to the merge queue Apr 30, 2024
Merged via the queue into dev with commit caab673 Apr 30, 2024
4 checks passed
@Zyie Zyie deleted the bugfix/text-padding-clear branch April 30, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: 8.1.0 Text texture is generated with the previous texture still partially visible
3 participants