Skip to content

fix: Handle 'pixel' size mode for shape labels#7790

Open
camdecoster wants to merge 6 commits intomasterfrom
cam/7749/shape-text-position-pixel-size-mode
Open

fix: Handle 'pixel' size mode for shape labels#7790
camdecoster wants to merge 6 commits intomasterfrom
cam/7749/shape-text-position-pixel-size-mode

Conversation

@camdecoster
Copy link
Copy Markdown
Contributor

@camdecoster camdecoster commented May 1, 2026

Description

Update shape label positioning logic to handle pixel size mode.

Closes #7749.

Changes

  • Update position calculations
  • Export helper to aid in calculations
  • Add tests
  • Add mock with baseline image

Screenshots

Before After
image image

Testing

  • Be on master
  • Run devtools
  • Add new mock temporarily on branch
  • Load the mock
  • Note that the labels are missing
  • Switch to this branch
  • Load the mock again
  • Notes that the labels are positioned correctly

@camdecoster camdecoster self-assigned this May 1, 2026
@camdecoster
Copy link
Copy Markdown
Contributor Author

The initial mock validation failed because one of the shape types was listed as "rectangle", which isn't valid. "rect" is what should have been listed. I didn't notice this because the default shape used when an invalid type is passed in is... "rect". Thanks CI, for keeping us honest.

@camdecoster camdecoster marked this pull request as ready for review May 1, 2026 22:16
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.

[BUG]: Text in circle and rectangle shapes is positioned incorrectly

1 participant