0

Playing with xtk (http://www.goxtk.org). How do you impose a size to the renderer? I'm asking because upon calling init on the renderer, the container div grows. I'm not using width or high 100% as in the examples, I'm using an absolute size. Thanks for any hint.

1 Answers1

0

It should work to specify the renderer size in pixel by adjusting the -tag which is the container for the X.renderer.

For example, this is from XTK Lesson 7 where three X.renderers are used with an absolute size (see http://lessons.goxtk.com/07/):

...
<div id='r1' style='background-color:#000000; float: left; width: 300px; height: 300px; margin:10px;'></div>
<div id='r2' style='background-color:#000000; float: left; width: 300px; height: 300px; margin:10px;'></div>
<div id='r3' style='background-color:#000000; float: left; width: 300px; height: 300px; margin:10px;'></div>
...

Nevertheless, for the automatic progressbar to be displayed properly, the position style is changed to relative. This might cause the container to adjust depending on how your general page layout looks.

If you rather want the absolute position style and don't need the progressbar, you can disable it like this which also prevents changing the position style of the container:

...
r1 = new X.renderer('r1');
r1.config.PROGRESSBAR_ENABLED = false;
r1.init();
...
haehn
  • 967
  • 1
  • 6
  • 19