Avoid pan to 0,0 when followed player is not visible

This commit is contained in:
Michael Primm 2023-09-02 21:11:47 -05:00
parent eed1a2b444
commit 7ed6728e34
1 changed files with 1 additions and 5 deletions

View File

@ -592,9 +592,6 @@ DynMap.prototype = {
me.selectWorldAndPan(location.world, location, function() {
if(completed) completed();
});
} else {
var latlng = me.maptype.getProjection().fromLocationToLatLng(location);
me.panToLatLng(latlng, completed);
}
},
panToLayerPoint: function(point, completed) {
@ -779,8 +776,7 @@ DynMap.prototype = {
if (me.followingPlayer !== player) {
me.followPlayer(null);
}
if(player.location.world)
me.panToLocation(player.location);
me.panToLocation(player.location);
});
player.menuname.data('sort', player.sort);
// Inject into playerlist alphabetically