openDirection

gets/sets the open direction of the dropdown (either "up" or "down")

Examples


$.w=150;
$.h=400;

const dropdown1 = $.makeDropdown($.w/2, 30, 100, [
    "Option A",
    "Option B",
    "Option C"
]);

const dropdown2 = $.makeDropdown($.w/2, 80, 100, [
    "Option X",
    "Option Y",
    "Option Z"
]);

function update() {
    dropdown1.openDirection = "down";
    dropdown2.openDirection = "up";
    dropdown1.draw();
    dropdown2.draw();
}