mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Read "from the map" after any switch or clear verb, before anything else
"clear everything except flights from the map" and "hide everything from the map" now read as they do without the ending, instead of only offering Ask GEV or a place search. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
81192cfa50
commit
cd5a4443a2
4 files changed
+27
-14
No files matched your search
@@ -1002,13 +1002,6 @@ export function createOmnibar({ layers = [], isEntity = () => false } = {}) {
|
||||
* ("Show Low, AZ").
|
||||
*/
|
||||
function switchRows(line, ask) {
|
||||
// "remove flights from the map": the map is where every layer is. Not
|
||||
// the verb's own "off" ("turn off the screen" is no layer switch).
|
||||
const bare = line.replace(
|
||||
/\s+(?:from|off) (?:the )?(?:map|globe|screen|view)$/i,
|
||||
'',
|
||||
);
|
||||
if (bare !== line && SWITCH.test(bare.toLowerCase())) line = bare;
|
||||
const excepted = exceptRows(line, ask);
|
||||
if (excepted) return excepted;
|
||||
const switching = line.toLowerCase().match(SWITCH);
|
||||
|
||||
Reference in new issue
Block a user