Closed GoogleCodeExporter closed 8 years ago
Do you plan to bind() mouse events, as soon as a node element was rendered?
In this case onRender should fire *after* the node was rendered, i guess.
(I would prefer to use event delegation in this use case, rebinding would not
be neccessary).
Original comment by moo...@wwwendt.de
on 14 Jan 2011 at 7:37
I intend to bind after the node is rendered...I think you're right, I can use
JQuery's live function to monitor when nodes are rendered...but I guess a
convenience callback within dynatree wouldn't hurt either:)
Original comment by ekemo...@gmail.com
on 14 Jan 2011 at 3:02
true
Original comment by moo...@wwwendt.de
on 14 Jan 2011 at 4:08
[deleted comment]
The patch for this is in DynaTreeNode.render, to replace this line:
this.span.innerHTML = this._getInnerHtml();
with :
this.span.innerHTML = this._getInnerHtml();
if(opts.onRender){
opts.onRender.call(this.tree,this,this.span);
}
OnRender provides the node and the dom element that represents the rendered
node, in this case I am supplying the span element, but I am actually
interested in the link element for the title (I am binding context menu to link
element so I can also use DnD).
Original comment by ekemo...@gmail.com
on 15 Jan 2011 at 4:37
Original comment by moo...@wwwendt.de
on 16 Jan 2011 at 8:09
Thought:
an additional 'onQueryRender' could be called *before* rendering.
It can be used to implement the rendering of the node's span/a tag (returning
'false' to stop default rendering).
Original comment by moo...@wwwendt.de
on 16 Jan 2011 at 5:05
I would say yes, I didn't need that but it is a good bet that someone else
might need it, you never know what sort of use cases are out there:) Since that
callback is available for the other events, I'll recommend adding it for
completeness.
Original comment by ekemo...@gmail.com
on 17 Jan 2011 at 1:05
Original comment by moo...@wwwendt.de
on 23 Jan 2011 at 8:44
Original comment by moo...@wwwendt.de
on 23 Jan 2011 at 8:48
considered verified
Original comment by moo...@wwwendt.de
on 17 Jul 2012 at 4:16
Original comment by moo...@wwwendt.de
on 17 Jul 2012 at 4:19
Original issue reported on code.google.com by
ekemo...@gmail.com
on 13 Jan 2011 at 3:07