3

I am trying to append the gui DOM element to a (small) div container rather than to the default HTML document. Since I need to resize it for the smaller container, and I am trying :

var gui = new dat.GUI({"autoPlace": false, "width": 30, "height": 5 * 20 - 1});

(5*20-1 for the height attribute comes from 5 rows of 20 pixels each).

autoPlace works, width works, but height doesn't.

I have also tried to change the DOM element style directly (as one would do for the top and left attributes) :

gui.domElement.style.height = 50;    

... but it didn't work either.

Can someone put me on the right tracks to control the gui's height? At the end of the day I am trying to get, manually, the gui proportions inside a smaller container the same as in the full window.

Janthelme
  • 989
  • 10
  • 23

0 Answers0