MCPcopy
hub / github.com/dataarts/dat.gui / addPresetOption

Function addPresetOption

src/dat/gui/GUI.js:1185–1193  ·  view source on GitHub ↗
(gui, name, setSelected)

Source from the content-addressed store, hash-verified

1183}
1184
1185function addPresetOption(gui, name, setSelected) {
1186 const opt = document.createElement('option');
1187 opt.innerHTML = name;
1188 opt.value = name;
1189 gui.__preset_select.appendChild(opt);
1190 if (setSelected) {
1191 gui.__preset_select.selectedIndex = gui.__preset_select.length - 1;
1192 }
1193}
1194
1195function showHideExplain(gui, explain) {
1196 explain.style.display = gui.useLocalStorage ? 'block' : 'none';

Callers 2

GUI.jsFile · 0.85
addSaveMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…