diff --git a/public_html/script.js b/public_html/script.js
index 1813ff7..21c96b8 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -851,15 +851,22 @@ function selectPlaneByHex(hex,autofollow) {
SelectedPlane = null;
}
- FollowSelected = (autofollow ? true : false);
+ if (SelectedPlane !== null && autofollow) {
+ FollowSelected = true;
+ if (GoogleMap.getZoom() < 8)
+ GoogleMap.setZoom(8);
+ } else {
+ FollowSelected = false;
+ }
+
refreshSelected();
}
function toggleFollowSelected() {
FollowSelected = !FollowSelected;
- refreshSelected();
if (FollowSelected && GoogleMap.getZoom() < 8)
GoogleMap.setZoom(8);
+ refreshSelected();
}
function resetMap() {