fixed broked DOM parenting

This commit is contained in:
arodic 2011-04-15 17:23:43 -07:00
parent 23357ff180
commit 9bc6dc0074

7
gui.js
View File

@ -35,7 +35,7 @@ var GUI = function(parameters) {
var resizeTimeout;
parameters.domElement ? this.domElement = parameters.domElement : this.domElement = document.createElement('div');
this.domElement = document.createElement('div');
this.domElement.setAttribute('class', 'guidat');
this.domElement.style.width = width+'px';
@ -178,6 +178,11 @@ var GUI = function(parameters) {
this.domElement.appendChild(controllerContainer);
this.domElement.appendChild(toggleButton);
if ( parameters.domElement ){
GUI.autoPlace = false;
parameters.domElement.appendChild(this.domElement);
}
if (GUI.autoPlace) {
if(GUI.autoPlaceContainer == null) {
GUI.autoPlaceContainer = document.createElement('div');