We’ve now rolled this out across the National Maritime Museum’s collections pages. I think it looks rather nice.
There’s an example page on this site, using one of my photos from Flickr. It fixes an annoying bug in Opera, which doesn’t fire onload events for images loaded from the cache. Consequently, the setup code never ran in Opera, meaning the ‘zoom on/off’ link never did anything. Until I discovered the magical img.complete
property. I’m not sure it’s a standard DOM property for images, but it does the job. Opera users can now enjoy the rich JavaScript goodness, rather than looking enviously at the users of web browsers which actually work.
I’ve added keyboard support, since device-independent control is a AA accessibility requirement*. You can focus the control with the tab key. While it has focus, the cursor keys move the magnifier, not the browser window. Shift+cursor keys move it around faster (thanks to Dan Champion for suggesting that improvement).
It supports simple, inline HTML in the popup notes now too – basically, embedded images, links and simple text formatting. I can’t decide if it would be neat, or just plain annoying, to have a note that played an embedded audio clip when it appeared.
The Museum’s trustees are very impressed by it – go me!
*Wouldn’t voice control be cool? Like that bit in Bladerunner where he examines the photo of the bathroom – “Pan left. Stop. Enhance.”