From 446da7ba0114c33d4a1d1c1919d6a38f4a128741 Mon Sep 17 00:00:00 2001 From: George Michael Brower Date: Mon, 18 Apr 2011 11:34:10 -0700 Subject: [PATCH] default parameters --- src/gui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui.js b/src/gui.js index 52a1166..222d8b0 100644 --- a/src/gui.js +++ b/src/gui.js @@ -1,5 +1,9 @@ var GUI = function(parameters) { + if (parameters == undefined) { + parameters = {}; + } + var _this = this; var MIN_WIDTH = 240; @@ -178,7 +182,7 @@ var GUI = function(parameters) { this.domElement.appendChild(controllerContainer); this.domElement.appendChild(toggleButton); - if ( parameters.domElement ){ + if ( parameters.domElement ) { GUI.autoPlace = false; parameters.domElement.appendChild(this.domElement); }