When trying to add components by using the .element property and appending them to an existing <div/> the components are never considered "ready" and therefore never resize, or show correctly.
Expected Behavior
Should be able to add a UI anywhere in the DOM tree and it all work as expected.
Test app / minimal test case
class Main {
static public function main() {
haxe.ui.Toolkit.init();
var main = new VBox();
var button1 = new Button();
button1.text = "Button 1";
main.addComponent(button1);
var button2 = new Button();
button2.text = "Button 2";
main.addComponent(button2);
js.Browser.document.getElementById("content").appendChild(main.element);
}
}
When trying to add components by using the
.element
property and appending them to an existing<div/>
the components are never considered "ready" and therefore never resize, or show correctly.Expected Behavior
Should be able to add a UI anywhere in the DOM tree and it all work as expected.
Test app / minimal test case