mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
add a way to remove a folder
This commit is contained in:
parent
ab80fca553
commit
c83a0e3dde
@ -583,6 +583,24 @@ common.extend(
|
|||||||
return gui;
|
return gui;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
removeFolder: function(folder) {
|
||||||
|
this.__ul.removeChild(folder.domElement.parentElement);
|
||||||
|
|
||||||
|
delete this.__folders[folder.name];
|
||||||
|
|
||||||
|
// Do we have saved appearance data for this folder?
|
||||||
|
if (this.load && // Anything loaded?
|
||||||
|
this.load.folders && // Was my parent a dead-end?
|
||||||
|
this.load.folders[folder.name]) {
|
||||||
|
delete this.load.folders[folder.name];
|
||||||
|
}
|
||||||
|
|
||||||
|
const _this = this;
|
||||||
|
common.defer(function() {
|
||||||
|
_this.onResize();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
open: function() {
|
open: function() {
|
||||||
this.closed = false;
|
this.closed = false;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user