mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Follow, tankers and AWACS completed
This commit is contained in:
@@ -24,9 +24,10 @@ export class Dropdown {
|
||||
this.#clip();
|
||||
});
|
||||
|
||||
this.#element.addEventListener("mouseleave", ev => {
|
||||
this.#close();
|
||||
});
|
||||
// Commented out since it is a bit frustrating, particularly when the dropdown opens towards the top and not to the bottom
|
||||
//this.#element.addEventListener("mouseleave", ev => {
|
||||
// this.#close();
|
||||
//});
|
||||
}
|
||||
|
||||
setOptions(optionsList: string[])
|
||||
@@ -61,7 +62,10 @@ export class Dropdown {
|
||||
this.#index = idx;
|
||||
this.#close();
|
||||
this.#callback(option);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
reset() {
|
||||
@@ -73,6 +77,12 @@ export class Dropdown {
|
||||
return this.#value.innerText;
|
||||
}
|
||||
|
||||
setValue(value: string) {
|
||||
var index = this.#optionsList.findIndex((option) => {return option === value});
|
||||
if (index > -1)
|
||||
this.selectValue(index);
|
||||
}
|
||||
|
||||
getIndex() {
|
||||
return this.#index;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user