add removeFolder. From dataarts/dat.gui#143

This commit is contained in:
Shun Git 2017-10-09 09:47:52 +08:00
parent 2659494a80
commit 3aaa59d225

View File

@ -583,6 +583,20 @@ common.extend(
return gui; return gui;
}, },
/**
* @param name
*/
removeFolder: function(name) {
var folder = this.__folders[name];
if (!folder) {
return;
}
folder.close();
this.__ul.removeChild(folder.domElement.parentNode);
delete this.__folders[name];
this.onResize();
},
open: function() { open: function() {
this.closed = false; this.closed = false;
}, },