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

getBoundingRect returns incorrect Rect when Node has been flipped / reversed #64

Closed
oisinlavery opened this issue Jul 23, 2020 · 8 comments

Comments

@oisinlavery
Copy link

Screen Shot 2020-07-23 at 4 10 49 PM

The containing FrameNode is at [0,0]
The TextNode is reversed and getBoundingRect incorrectly reports y = 42

@Andreslav
Copy link
Contributor

@oisinlavery Hey. Can you provide a link to the file with the problem?

@oisinlavery
Copy link
Author

Hey Andre, sure thing:
https://www.figma.com/file/fgQkqkQzXz5mmyH6Oi0Idn/getBoundingRect-test?node-id=5%3A2

"G - flipped" and "Red - not flipped" should have the same bounding rect but the y values are not the same.

@Andreslav
Copy link
Contributor

I don't know how to fix it yet (

@oisinlavery
Copy link
Author

Do you think it's a trigonometry issue or a Figma data issue?

@Andreslav
Copy link
Contributor

Trigonometry. I seem to have figured out what to do.

@oisinlavery
Copy link
Author

sweet, I'll test it out first thing tomorrow.

@oisinlavery
Copy link
Author

I can confirm that this is working well now. Thanks for fixing so quickly Andreslav.

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

No branches or pull requests

2 participants