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

Trunk8 cutting text to late #38

Open
simonferndriger opened this issue Oct 8, 2013 · 8 comments
Open

Trunk8 cutting text to late #38

simonferndriger opened this issue Oct 8, 2013 · 8 comments

Comments

@simonferndriger
Copy link

Example:
http://www.lookr.com/de/lookout/1357752542-S%C3%B6renberg

Below "Marbach LU", the description is empty, because the text is NOT cut, therefore it is too long and gets hidden because of the css "overflow:hidden".

SAME results when using an additional "span" element for the target text.

image

@rviscomi
Copy link
Owner

rviscomi commented Oct 8, 2013

Can you double check the timing of your $.trunk8() calls, to make sure that this isn't an issue of trunk8ing text in one font, then substituting it with a bigger web font?

@simonferndriger
Copy link
Author

OK, sure. Please tell me again how I can check properly?

@rviscomi
Copy link
Owner

Put a breakpoint in your code when you trunk8 and check the font of the text. I looked at your source and couldn't find where you call trunk8().

@simonferndriger
Copy link
Author

OK, trunk8() gets called 2 times. First on document.ready (where the new font seems not to be loaded fully yet), then again on window.load. See attachment.

Does this mean, that I only are allowed to call trink8 once on window.load here?

First call (document.ready):
first_call

Second call (window.load):
second_call

@simonferndriger
Copy link
Author

I now tried an alternative version in which I execute trunk8 only ONCE and AFTER the font is fully loaded.
SAME result.

onwindowload

@rviscomi
Copy link
Owner

The other thing that could be affecting it is the "11km" part. When is that text set? Is it possible that the text is truncated to the full line then the km is inserted?

@simonferndriger
Copy link
Author

OK, good idea. But no. The text is generated directly via PHP and is there from the very beginning. Sorry.
Any other options?

@rviscomi
Copy link
Owner

Sorry I can't think of anything else. For filing bugs against trunk8 you should show what part of the trunk8 code is broken. So I would suggest stepping through the code to find out why it isn't working as expected, and if you find it you can either report it here in this issue or file a pull request.

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