Arjunsos / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE : Event labels wrap when 'classname' attribute is added and text is bold. #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add 'classname' attribute to event label
2. Within CSS style, make new class font-weight = bold
3.

What is the expected output? What do you see instead?
Event label wraps on to next line

What version of the product are you using? On what operating system?
2.2.0 / FF3.03 / Windows

Please provide any additional information below.

Original issue reported on code.google.com by dsav...@semi-directory.com on 12 Oct 2008 at 6:19

GoogleCodeExporter commented 8 years ago
Added test case as part of test example.
I believe the problem is that 
SimileAjax.Graphics._FontRenderingContext.prototype.computeSize needs to apply 
the 
css classname before computing the size. I'm updating the function to do that.

Original comment by larryklu...@gmail.com on 27 Oct 2008 at 9:23

GoogleCodeExporter commented 8 years ago

Original comment by stefano.mazzocchi@gmail.com on 25 Mar 2009 at 7:01

GoogleCodeExporter commented 8 years ago
I am not sure what the status on this is.

It looks like SimileAjax.Graphics._FontRenderingContext.prototype.computeSize 
was
updated to accept a classname.  However, it looks like all of the
this._frc.computeSize calls in the painters don't pass in a classname (at least 
in
the code I checked out of SVN).

I believe all of the lines that look like:

var labelSize = this._frc.computeSize(text);

can be changed to:

var labelSize = this._frc.computeSize(text, "timeline-event-label " +
(labelData.className ? labelData.className : ""));

This is working for me w/ CompactPainter.

Original comment by mattd%wh...@gtempaccount.com on 23 Dec 2009 at 7:11