added parameters to pass DOM element for parenting

This commit is contained in:
arodic 2011-04-15 16:54:31 -07:00
parent c5526d1b98
commit 23357ff180

5
gui.js
View File

@ -1,4 +1,4 @@
var GUI = function() { var GUI = function(parameters) {
var _this = this; var _this = this;
@ -34,7 +34,8 @@ var GUI = function() {
var resizeTo = 0; var resizeTo = 0;
var resizeTimeout; var resizeTimeout;
this.domElement = document.createElement('div');
parameters.domElement ? this.domElement = parameters.domElement : this.domElement = document.createElement('div');
this.domElement.setAttribute('class', 'guidat'); this.domElement.setAttribute('class', 'guidat');
this.domElement.style.width = width+'px'; this.domElement.style.width = width+'px';