problem with "document.body"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with "document.body"

media
This post has NOT been accepted by the mailing list yet.
Hello community,

I have a problem with the "document.body" .
how do I add the "render.domElement" in a Qooxdoo class?

my Code:
var renderer = new THREE.WebGLRenderer();
document.body.appendChild(renderer.domElement);  

In Qooxdoo ???
var renderer = new THREE.WebGLRenderer();
this.add(renderer.domElement);


I have expanded the config.json file
"jobs": {
   "add-script": [{"uri": "three.js"}]
  }

Thanks!
media

Reply | Threaded
Open this post in threaded view
|

Re: problem with "document.body"

media
This post has NOT been accepted by the mailing list yet.
I myself have found a solution.

var widget = new qx.ui.core.Widget();
 
widget.addListener("appear", function() {
  var el = widget.getContentElement().getDomElement();  
  el.appendChild(renderer.domElement);
  }, this);            

regards
media