mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-02 21:11:45 +01:00
Avoid pan to 0,0 when followed player is not visible
This commit is contained in:
parent
eed1a2b444
commit
7ed6728e34
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user