More work on presentation
Finished off the section on the digital despatch, with lots of screenshots, and began the section on maps.
This required me to tackle the remaining features I hadn't added yet, for a variety of different transitions used to show content, because I need to have content arriving from different directions in this section. I've now refactored all the showing and hiding code, and I have a total of six different transitions for showing and six for hiding a slide. I've cleaned up a lot of that code, so it's now less than 200 lines, and I've solved one issue with object encapsulation that was puzzling me. When you make a setTimeout call, you need to pass a string containing the code to be executed when the timeout is up. My problem was that I wanted to set the timeout from inside an object method, calling another method of the same object; however, the "this" keyword won't work, because the timeout is executed outside the object scope. The solution was to add a parameter to the object constructor in which the name of the global pointer that refers to the object is passed in; this way, the object "knows its own name", and can set a timeout calling its own method using that variable name.
There's one remaining issue with webkit browsers (Epiphany and Chrome) whereby moving show transitions always seem to start from top left, even when they're asked not to. I'll work on that next week. I may have to explicitly set the slide's left and top to what they already are (left = offsetLeft + 'px') so that they can retrieve a working starting value for the motion calculations.