0

Use cached center for initial view. Fixes #1453.

This commit is contained in:
Willem Mulder
2018-10-06 18:12:17 +02:00
parent 3cceaf5869
commit 3cc184a751
2 changed files with 3 additions and 3 deletions

View File

@@ -338,8 +338,8 @@ overviewer.util = {
.addTo(overviewer.map);
overviewer.current_world = overviewerConfig.worlds[0];
//myLayer.addTo(overviewer.map);
overviewer.map.setView(overviewer.util.fromWorldToLatLng(tset.spawn[0], tset.spawn[1], tset.spawn[2], tset), 1);
let center = overviewer.collections.centers[overviewer.current_world];
overviewer.map.setView(center[0], center[1]);
if (!overviewer.util.initHash()) {
overviewer.worldCtrl.onChange({target: {value: overviewer.current_world}});

View File

@@ -589,7 +589,7 @@ class TileSet(object):
if (self.regionset.get_type() == None and self.options.get("showspawn", True)):
d.update({"spawn": self.options.get("spawn")})
else:
d.update({"spawn": "false"});
d.update({"spawn": False})
try:
d['north_direction'] = self.regionset.north_dir