diff --git a/html/script.js b/html/script.js index 30251d1..4b9bf87 100644 --- a/html/script.js +++ b/html/script.js @@ -5077,7 +5077,7 @@ function onSearch(e) { let results = []; if (searchTerm) results = findPlanes(searchTerm, "byIcao", "byCallsign", "byReg", "byType", true); - if (results.length > 0 && globeIndex) { + if (results.length > 0 && haveTraces) { toggleIsolation("on"); if (results.length < 100) { getTrace(null, null, {list: results}); @@ -6003,6 +6003,8 @@ function findPlanes(queries, byIcao, byCallsign, byReg, byType, showWarnings) { || (byReg && plane.registration != null && plane.registration.toLowerCase().match(query)) || (byType && plane.icaoType != null && plane.icaoType.toLowerCase().match(query)) ) { + results.push(plane); + /* leaving this code in place just in case, not sure what this limitation to planes on screen is for when searching if (globeIndex) { if (plane.inView) results.push(plane); @@ -6010,6 +6012,7 @@ function findPlanes(queries, byIcao, byCallsign, byReg, byType, showWarnings) { if (plane.checkVisible()) results.push(plane); } + */ } } } @@ -6028,7 +6031,7 @@ function findPlanes(queries, byIcao, byCallsign, byReg, byType, showWarnings) { } else { console.log("No match found for query: " + queries); let foundByHex = 0; - if (globeIndex) { + if (haveTraces) { for (let i in queries) { const query = queries[i]; if (query.toLowerCase().match(/~?[a-f,0-9]{6}/)) {