Created
September 12, 2011 18:02
-
-
Save sdesai/1211940 to your computer and use it in GitHub Desktop.
Async Queue Usage Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tree = new Y.ParentWidget({ | |
id: "tree" | |
}); | |
tree.plug(Y.SM.Plugin.WidgetParentRenderQueue, {timeout:2000}); | |
tree.add([ | |
{ type: Y.ChildWidget, id: "leaf-1", label: "Leaf One" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Two" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Three" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Four" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Five" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Six" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Seven" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Eight" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Nine" }, | |
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Ten" } | |
]); | |
tree.render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tree.render(); tree.add(); does bring out the issue. The above snippet doesn't.