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: cleanup redrawTextBoundingBox #6518

Merged
merged 2 commits into from Apr 25, 2023
Merged

fix: cleanup redrawTextBoundingBox #6518

merged 2 commits into from Apr 25, 2023

Conversation

ad1992
Copy link
Member

@ad1992 ad1992 commented Apr 25, 2023

No description provided.

@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Apr 25, 2023 7:40am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Apr 25, 2023 7:40am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Apr 25, 2023 7:40am

Comment on lines -86 to -92
if (isArrowElement(container)) {
const centerX = textElement.x + textElement.width / 2;
const centerY = textElement.y + textElement.height / 2;
const diffWidth = metrics.width - textElement.width;
const diffHeight = metrics.height - textElement.height;
boundTextUpdates.x = centerY - (textElement.height + diffHeight) / 2;
boundTextUpdates.y = centerX - (textElement.width + diffWidth) / 2;
Copy link
Member

Choose a reason for hiding this comment

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

this isn't needed anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

no its taken care in computeBoundTextPosition hence removed from here

Copy link
Member Author

Choose a reason for hiding this comment

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

for more context it was fixed in computeBoundTextPosition in this PR - https://github.com/excalidraw/excalidraw/pull/6445/files

@ad1992 ad1992 merged commit dae81c0 into master Apr 25, 2023
8 checks passed
@ad1992 ad1992 deleted the aakansha-cleanup-redraw branch April 25, 2023 12:27
alswl pushed a commit to alswl/excalidraw that referenced this pull request Nov 15, 2023
* chore: cleanup redrawTextBoundingBox

* fix
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.

None yet

2 participants