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

Parent padding should be excluded #53

Open
jchaney01 opened this issue May 27, 2016 · 3 comments
Open

Parent padding should be excluded #53

jchaney01 opened this issue May 27, 2016 · 3 comments

Comments

@jchaney01
Copy link

If the directive is wrapped inside an element with padding, it appears this is not being considered. The result is that the text is sized as if this padding was not there.

A solution could be changing:

Math.min((parent[0].offsetWidth - 6) * ratio * compressor,

to

Math.min(((parent[0].offsetWidth - (parseFloat(getComputedStyle(parent[0]).paddingLeft) + parseFloat(getComputedStyle(parent[0]).paddingRight))) - 6) * ratio * compressor,
@helarqjsc
Copy link

Is there any reason why this change still isn't added to the repository?

@patrickmarabeas
Copy link
Owner

Please confirm v4.2.3 fixes issue as expected

@haxxxton
Copy link

A solution to this issue is likely to also solve #18

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

4 participants