Exploration

Archive: 7 November 2004

I’m working on S5 1.1, and want to keep people involved in moving it forward. So I’ve put up a testbed slide show file, which is simply a copy of the introductory presentation file that points to a new UI directory. The current state of things, which I’ll call 1.1a01, adds two new features:

An author can indicate whether or not the file should default to slide show or outline view. The default is slide show. If you want it to default to outline view, you add:

<meta name="slideshow" content="no" />

The other possible content value is, obviously, “yes”. This should be useful to professors who want to present notes in class as a slide show, and then post the same file to the class Web site in outline view. The toggle key and button will both still flip between outline and slide show views, so you aren’t trapped in one or the other. You just get to choose how the file will load up.

When in slide show view, the font size automatically scales based on the window size. This means that if you’re expecting 1024×768 and get 800×600, the slides won’t become impossibly long. Note, however, that this scales text—not images. I’m not up to that yet, given that I have to think about how to (or even if I want to) handle them. I’m using an onresize event handler to scale the fonts if you change the window size, as well as firing the scaling function when the slides are first loaded. In outline view, the scaling is suppressed.

In adding this, however, I’ve come up against the same problem that prevented font scaling from appearing in S5 1.0: Gecko-based browsers mangle the layout when the font scales. To see what I mean, toggle the slide view off and then back on. Text separation, and the widths of inline elements, will not be recalculated when the slide view is restored. The same kind of thing happens if you change the window size. Once you’ve settled on a new size or toggled back to slide view, just hit Reload and all is well. So it seems to be a case of not consistently redrawing element boxes when font sizes change; force them to be redrawn with a reload, and things are drawn as they should be.

I can’t figure out how to fix this short of firing a reload event in the fontScale() routine, which I’d really rather avoid. I suppose I could suppress scaling for Gecko browsers on resize (and fire a reload after toggling back to slide view) but I’d like to find a more elegant way to fix the problem. For that matter, if anyone wants to make my scaling logic more elegant, go for it. The frustration of cross-browser incompatibilities in manipulating styles came to the fore when I wrote that routine.

There are several ideas and suggestions from the 1.0 release that have yet to be implemented: be patient! We’re on 1.1a01, remember, and S5, for all its promise, remains a “free time” project. (My editors will no doubt be dismayed to hear that I think I even have free time.) If I get time, I’ll write up a concrete to-do list so you can see what’s planned. For now, if you’d like to help, please just focus on the problems I mentioned, or new problems caused by these features that I didn’t find. Speaking of which, if any of you IE/Mac wizards can figure out what I’ve done that breaks S5 in that browser, I’d very much appreciate it.