Nevermore
Nevermore

Reputation: 358

How to change width of dat.gui dropdown menu and deselect item

I'm using the dat.gui library in javascript and I have two questions:

  1. How to change the width of a dat.gui dropdown menu?
  2. How to de-select a dropdown menu item without selecting another?

Initializing the dropdown

const indexParams = {
  index: -1,
};
const indexGUI = gui.addFolder("Index");
indexGUI.open();
const indexDropdown = indexGUI.add(indexParams, "index", [0, 1, 2, 3, 4]);

Image of the dropdown before interaction Initial Dropdown

Upvotes: 1

Views: 108

Answers (0)

Related Questions