mirror of https://github.com/webbukkit/dynmap.git
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() {
|
me.selectWorldAndPan(location.world, location, function() {
|
||||||
if(completed) completed();
|
if(completed) completed();
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
var latlng = me.maptype.getProjection().fromLocationToLatLng(location);
|
|
||||||
me.panToLatLng(latlng, completed);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
panToLayerPoint: function(point, completed) {
|
panToLayerPoint: function(point, completed) {
|
||||||
|
@ -779,8 +776,7 @@ DynMap.prototype = {
|
||||||
if (me.followingPlayer !== player) {
|
if (me.followingPlayer !== player) {
|
||||||
me.followPlayer(null);
|
me.followPlayer(null);
|
||||||
}
|
}
|
||||||
if(player.location.world)
|
me.panToLocation(player.location);
|
||||||
me.panToLocation(player.location);
|
|
||||||
});
|
});
|
||||||
player.menuname.data('sort', player.sort);
|
player.menuname.data('sort', player.sort);
|
||||||
// Inject into playerlist alphabetically
|
// Inject into playerlist alphabetically
|
||||||
|
|
Loading…
Reference in New Issue