0

added support for hashchange event for recent browsers

This commit is contained in:
Kang Seonghoon
2013-05-02 01:22:55 +09:00
parent 4b1e8fd3e4
commit 372b4e5e44

View File

@@ -138,8 +138,9 @@ overviewer.util = {
overviewer.mapView.render(); overviewer.mapView.render();
// Jump to the hash if given // Jump to the hash if given (and do so for any further hash changes)
overviewer.util.initHash(); overviewer.util.initHash();
$(window).on('hashchange', function() { overviewer.util.initHash(); });
// create this control after initHash so it can correctly select the current world // create this control after initHash so it can correctly select the current world
var worldSelector = new overviewer.views.WorldSelectorView({tagName:'DIV'}); var worldSelector = new overviewer.views.WorldSelectorView({tagName:'DIV'});