web: add layer fallback to goToHash
With the changes to things being indexed by path instead of name, old hashes would stop working. To make this a bit less jarring, we can fall back to the default tileset of a world, which means the map would still load.
This commit is contained in:
@@ -811,6 +811,11 @@ overviewer.util = {
|
||||
}
|
||||
|
||||
var target_layer = overviewer.collections.mapTypes[world_name][tileset_name];
|
||||
if (!target_layer) {
|
||||
var default_tset_name = Object.keys(
|
||||
overviewer.collections.mapTypes[world_name])[0];
|
||||
target_layer = overviewer.collections.mapTypes[world_name][default_tset_name];
|
||||
}
|
||||
var ovconf = target_layer.tileSetConfig;
|
||||
|
||||
var latlngcoords = overviewer.util.fromWorldToLatLng(parseInt(coords[1]),
|
||||
|
||||
Reference in New Issue
Block a user