-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Utils.measureTextWidth should add span to relevant container not body - measurements are off #316
Comments
yeah, that makes sense @paulpooch. we could change the function signature to export function measureTextWidth(text: string, className = "", containerElement = document.body) {
...
} |
Sounds good. My issue was in datePickerCaption.positionArrows() It was measuring totally wrong and my arrows were like halfway across the page : ) Could you slap a ref on on the root div of datePickerCaption and measure relative to that element? I can make a PR if you want I don't know TS yet. |
@paulpooch if you're interested in learning some TS then go ahead and make a PR! 🎩 we'll help you through any tricky bits. otherwise the team will pick this up early next year. |
@paulpooch I had some time to open a PR for this today. Feel free to peruse #320 and see if it makes sense and addresses things correctly. Would appreciate your thoughts here. 👍 |
Thanks I'll check this out tomorrow.
…On Dec 6, 2016 4:13 PM, "Chris Lewis" ***@***.***> wrote:
@paulpooch <https://github.com/paulpooch> I had some time to open a PR
for this today. Feel free to peruse #320
<#320> and see if it makes
sense and addresses things correctly. Would appreciate your thoughts here.
👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAg7evwOpAxlMWEbvQUsMHHy587HxEigks5rFc_ggaJpZM4LFoLX>
.
|
My root has font-size of 100px.
My div holding the
<Blueprint.DatePicker>
hasfont-size: 16px
.DatePicker tries to measure the width of the month labels by adding 's to the body - as a result the measurements are wrong. I'd suggest the 's get appended to the component container and NOT document.body.
This would stop differing font-sizes from screwing things up.
The text was updated successfully, but these errors were encountered: