Hello dear qooxdoo developers
I'm using a qx.ui.embed.Canvas object to later get WebGL context, but it
seems this object doesn't correctly communicate it's size (set in the
constructor) to parent objects. I have this code in Application.js:
// Create main UI container
var mainContainer = new qx.ui.container.Composite();
// Use a HBox to separate items into different columns
var mainLayout = new qx.ui.layout.HBox();
mainContainer.setLayout(mainLayout);
// Create a container for the left side (canvas, displays)
var leftContainer = new qx.ui.container.Composite();
// Use a VBox to separate items into different rows
var leftLayout = new qx.ui.layout.VBox();
leftContainer.setLayout(leftLayout);
mainContainer.add(leftContainer);
// Create the canvas element to render WebGL in
var canvas = new qx.ui.embed.Canvas(600, 600);
// Add it to the left side of the UI
leftContainer.add(canvas);
// Create a container to hold the displays
var displayContainer = new qx.ui.container.Composite();
// Use a VBox to stack display vertically
var displayLayout = new qx.ui.layout.VBox();
displayContainer.setLayout(displayLayout);
leftContainer.add(displayContainer);
// Add some dummy "displays"
displayContainer.add(new qx.ui.basic.Label("Price"));
displayContainer.add(new qx.ui.basic.Label("Weight"));
// Create a container for the right side (controls)
var rightContainer = new qx.ui.container.Composite();
// Use a VBox to separate items into different rows
var rightLayout = new qx.ui.layout.VBox();
rightContainer.setLayout(rightLayout);
mainContainer.add(rightContainer);
// For each part, create a new container to hold the controls
var partContainer = new qx.ui.container.Composite();
// Use a VBox to separate items into different rows
var partLayout = new qx.ui.layout.VBox();
partContainer.setLayout(partLayout);
rightContainer.add(partContainer);
// Add some dummy "controls"
partContainer.add(new qx.ui.basic.Label("Control1"));
partContainer.add(new qx.ui.basic.Label("Control2"));
this.getRoot().add(mainContainer);
The resulting space where the canvas is shown is only around 100x50px
wide, not 600x600.
Does anyone have an idea why this happens, and how to prevent it?
Kind regards,
Adrian Schweizer
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel