[Dojo-interest] Popping up a TooltipDialog with a Tree in it, size problem
neek at nickfenwick.com
Mon Apr 1 23:17:48 EDT 2013
I have a DropDownButton that contains a Tree. I happen to create the
Tree programatically. See this sandbox example:
The first time you click the button, the dropdown opens but not all of
the tree can be seen. If you close and re-open the dropdown, the tree
is now fully visible.
I cannot see how to cause the TooltipDialog to open so that the tree is
fully visible the first time it opens. I have handled the 'onOpen'
event of the dialog, for example, which seems to be called after the
Tree is fully rendered and the dialog is on-screen (if you breakpoint
inside my open handler, you can see it's all rendered in the browser at
that time) but calling resize() on the dialog doesn't cause it to
contain its child.
I had thought it was to do with the async nature of my store in our real
app, but putting together this simple example with a synchronous Memory
store and hardcoded data also demonstrates the problem.
Setting doLayout:true on the tooltipdialog causes it to never lay itself
There are other improvements that could be made, for example it would
probably be simpler to extend DropDownButton rather than created a
templated dijit which only contains a DropDownButton, but those issues
are secondary to the main question.
Can someone shed some light on this please?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dojo-interest