OZtree
OZtree copied to clipboard
config.ui.loadingMessage timer causes warnings on homepage
On both Safari and Chrome on my machine it starts in a strange position, not properly centred in the viewport as it should be (and is on the main site). Looking into the javascript console it looks like a possible race condition in which the first error says "Time 'Page load' already exists" then multiple subsequent errors say "Timer 'Page load' does not exist". These errors are caused by something in the tour controller.
I noticed this earlier too. config.ui.loadingMessage tries to time the page load by measuring the time between it's turned on and turned off.
The flights also try to turn the loadingMessage on/off, so you see a spinner whilst it's warming up. These calls get knotted up, and successive on's result in the first error, and successive off's result in the second.
I'm not sure if this is indicative of a problem (i.e. we should be investigating why we've knotted op our loadings) or just that loadingMessage should have a better implementation that handles this.
I guess this means that there may be another reason why the tree doesn't centred on the correct position before the flight starts then?
It's very unlikely to be related.