default parameters

This commit is contained in:
George Michael Brower 2011-04-18 11:34:10 -07:00
parent 6f07112f6b
commit 446da7ba01

View File

@ -1,5 +1,9 @@
var GUI = function(parameters) { var GUI = function(parameters) {
if (parameters == undefined) {
parameters = {};
}
var _this = this; var _this = this;
var MIN_WIDTH = 240; var MIN_WIDTH = 240;
@ -178,7 +182,7 @@ var GUI = function(parameters) {
this.domElement.appendChild(controllerContainer); this.domElement.appendChild(controllerContainer);
this.domElement.appendChild(toggleButton); this.domElement.appendChild(toggleButton);
if ( parameters.domElement ){ if ( parameters.domElement ) {
GUI.autoPlace = false; GUI.autoPlace = false;
parameters.domElement.appendChild(this.domElement); parameters.domElement.appendChild(this.domElement);
} }