Don't explode on map pan after deselecting an aircraft that was being followed.
This commit is contained in:
parent
d790600a86
commit
0c5472043e
|
@ -580,8 +580,9 @@ function initialize_map() {
|
|||
if (FollowSelected) {
|
||||
// On manual navigation, disable follow
|
||||
var selected = Planes[SelectedPlane];
|
||||
if (Math.abs(center[0] - selected.position[0]) > 0.0001 &&
|
||||
Math.abs(center[1] - selected.position[1]) > 0.0001) {
|
||||
if (typeof selected === 'undefined' ||
|
||||
(Math.abs(center[0] - selected.position[0]) > 0.0001 &&
|
||||
Math.abs(center[1] - selected.position[1]) > 0.0001)) {
|
||||
FollowSelected = false;
|
||||
refreshSelected();
|
||||
refreshHighlighted();
|
||||
|
|
Loading…
Reference in a new issue