From f336a837fe43b2c1079f498ebd8a26d0fdf9f32a Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Thu, 25 Mar 2021 03:53:44 +0100 Subject: [PATCH] when isolated, disable deselecting aircraft --- html/script.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/html/script.js b/html/script.js index a0586dc..4ffbdb7 100644 --- a/html/script.js +++ b/html/script.js @@ -3204,23 +3204,23 @@ function selectPlaneByHex(hex, options) { } else { if (multiSelect) { // multiSelect deselect - if (newPlane && newPlane.selected && !onlySelected && !options.noDeselect) { + if (newPlane && newPlane.selected && !onlySelected) { deselect(newPlane); newPlane = null; hex = null; } - } else { + } else if (oldPlane) { // normal deselect - if (oldPlane && oldPlane != newPlane) { + if (oldPlane != newPlane) { deselect(oldPlane); oldPlane = null; } - } - if (oldPlane != null && oldPlane == newPlane) { - deselect(newPlane); - oldPlane = null; - newPlane = null; - hex = null; + if (oldPlane == newPlane) { + deselect(newPlane); + oldPlane = null; + newPlane = null; + hex = null; + } } }