-
Notifications
You must be signed in to change notification settings - Fork 236
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
Feature: Add API for Paragraph's Bounds #537
Comments
Hi. thanks you. |
Yes, this would be very critical for my current project, too. |
My question is, should the returned bounds object always be the area's width? Or should it only be limited to the area's width when it spans outside of the area? For example
In the case of Line 1, the area's width should be used because the second half of it is not visible. Thus, the area's width limits it. In #587, I chose the second option because someone might want to use the bounds to determine whether or not the user clicked on the paragraph. If the first option is used, they would need to click directly on the text. If the second is used, they can click on the text or somewhere in the paragraph's vertical region. @maPaydar and @dlemmermann It would help to know what your use cases are to provide feedback on this API. |
To help implement #77 and #405, there should be some API to calculate a given paragraph's bounds by its index (the index in the list of visible paragraphs and all paragraphs). For example
The text was updated successfully, but these errors were encountered: