trunk8 icon indicating copy to clipboard operation
trunk8 copied to clipboard

Trunk8 cutting text to late

Open simonferndriger opened this issue 12 years ago • 8 comments

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

simonferndriger avatar Oct 08 '13 14:10 simonferndriger

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?

rviscomi avatar Oct 08 '13 21:10 rviscomi

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

simonferndriger avatar Oct 09 '13 09:10 simonferndriger

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().

rviscomi avatar Oct 10 '13 03:10 rviscomi

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 avatar Oct 10 '13 10:10 simonferndriger

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

onwindowload

simonferndriger avatar Oct 11 '13 15:10 simonferndriger

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?

rviscomi avatar Oct 20 '13 23:10 rviscomi

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

simonferndriger avatar Oct 21 '13 07:10 simonferndriger

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.

rviscomi avatar Oct 22 '13 04:10 rviscomi