Solving FF 3.0/Mac label wrapping problem and new ajax release

5 views
Skip to first unread message

LarryK

unread,
Oct 16, 2008, 2:33:38 PM10/16/08
to SIMILE Widgets
Hi,

I've been involved in an email conversation about the underlying
causes of Timeline labels wrapping w/ FF Mac 3.0. You can read the
discussion here:
https://bugzilla.mozilla.org/show_bug.cgi?id=458617

The precise problem is that offsetWidth returns an integer too small
to hold the same contents in another div without it wrapping. The
cause is that FF use sub-pixel rendering internally and is rounding
the sub-pixel width instead of using ceil. So if the width is 50.2
pixels internally, offsetWidth is returning 50 instead of 51. A new
(Timeline label) div with width 50 then wraps the text.

The bottom line is that the Mozilla folks don't plan to fix the
issue.
They recommend using getBoundingClientRect instead.

==>> The purpose of this email to explain my general plan and to get
your feedback. I plan on doing the following work sometime relatively
soon (next several weeks).

1) The change to using getBoundingClientRect (if available in the
browser) requires changing the ajax project within Simile widgets:
Plan:
a) Create an ajax release tag "2.1" to capture the current version
b) Make the change to use getBoundingClientRect when available (won't
require browser sniffing) and release as ajax tag 2.2

2) Currently, the Timeline api file uses the Simile/Ajax bundle from
MIT. I have realized that since the svn repository is available on
public urls from google, we can use the svn repository to serve the
library files. (Hooray!) Sometimes, the svn props of the stored files
have to be munged, but overall, it seems to work fine. As an example,
the file
http://simile-widgets.googlecode.com/svn/timeline/trunk/src/webapp/examples/monet/monet.html
uses Google to obtain the Timeline js libraries and MIT for the Simile/
Ajax libraries.
Plan
a) Test that Timeline works with Simile/Ajax library served from
Google repository
b) Update timeline-api.js to use the new Simile/Ajax 2.2 release from
Google
c) This will be an important change so probably will make a tagged
Timeline release 2.3 shortly thereafter.

Comments appreciated.

Regards,

Larry


David Huynh

unread,
Oct 17, 2008, 12:07:35 AM10/17/08
to simile-...@googlegroups.com
Hi Larry,

Thanks for tracking down this problem!

LarryK wrote:
> [...]


>
> 1) The change to using getBoundingClientRect (if available in the
> browser) requires changing the ajax project within Simile widgets:
> Plan:
> a) Create an ajax release tag "2.1" to capture the current version
> b) Make the change to use getBoundingClientRect when available (won't
> require browser sniffing) and release as ajax tag 2.2
>

Sounds good to me!

> 2) Currently, the Timeline api file uses the Simile/Ajax bundle from
> MIT. I have realized that since the svn repository is available on
> public urls from google, we can use the svn repository to serve the
> library files. (Hooray!) Sometimes, the svn props of the stored files
> have to be munged, but overall, it seems to work fine. As an example,
> the file
> http://simile-widgets.googlecode.com/svn/timeline/trunk/src/webapp/examples/monet/monet.html
> uses Google to obtain the Timeline js libraries and MIT for the Simile/
> Ajax libraries.
> Plan
>

Actually Google Code SVN isn't fast enough to be used in this way. But
there's a better way. Check out the static-site subproject

http://code.google.com/p/simile-widgets/source/browse/#svn/static-site

Then use svn:externals to create a link from ajax/2.1/ and timeline/2.2/
to the correct tags. When you check that in, I believe a shell script at
static.simile.mit.edu will do svn update to serve the new APIs within an
hour or so.

David

LarryK

unread,
Oct 17, 2008, 11:26:58 AM10/17/08
to SIMILE Widgets
Hi David,

Sounds good. Thank you for your part of getting the
static.simile.mit.edu setup, and, of course, for the marvelous sw!

Regards,

Larry

LarryK

unread,
Oct 27, 2008, 12:00:39 PM10/27/08
to SIMILE Widgets
Hi,

Per the plan (see the thread), I've released the current Ajax lib as
ver 2.1.0 and pushed it to the MIT server.
I added Release notes, Changes, License and Readme files to the Ajax
directory.

Regards,

Larry

LarryK

unread,
Nov 13, 2008, 12:42:34 PM11/13/08
to SIMILE Widgets
Hi,

I'm getting ready to release the trunk rev of Simile-Ajax as ver
2.2.0.

This is per the previously announced plan, see this thread
http://groups.google.com/group/simile-widgets/browse_thread/thread/1ce1aea86663fcf8/

It seems stable, there was one bug report which I fixed.

Changes are listed here:
http://simile-widgets.googlecode.com/svn/ajax/trunk/CHANGES.txt

Releasing the sw will put into production two important bug fixes:
* Wrapping of labels on FF 3/Mac
* Incorrect calculation of label width for labels with CSS styling

If no comments or objections, will plan to make the release sometime
next week.

Larry
Reply all
Reply to author
Forward
0 new messages