Keep label always visible in the hypertree?

16 views
Skip to first unread message

Xocial

unread,
Oct 15, 2009, 10:39:27 AM10/15/09
to JavaScript Information Visualization Toolkit
Hi Nico,

Thanks so much for this toolkit, I bet you have saved lots of
people :-) (especially for novices like me)

I have a question about the display of labels in hypertree.
It seems that labels will be temporally dispeared after we conduct
"click";
it that possible to keep the labels displayed during the animation
(when nodes move)?

Thanks in advance


Xocial

http://www.xocial.fr

Nico Garcia Belmonte

unread,
Oct 15, 2009, 11:19:52 AM10/15/09
to javascript-information...@googlegroups.com
Setting hideLabels: false in the onClick options should make the trick:

--
I would never die for my beliefs because I might be wrong.

Bertrand Russell

Xocial

unread,
Oct 15, 2009, 12:12:33 PM10/15/09
to JavaScript Information Visualization Toolkit
Thanks Nico,
it works in your hypertree example.

BTW I try to do the same thing on the code of David's image browser
( http://www.stephanieozer.com/kenwood/jit/examples/fortross6.html)
I try to keep both labels and images visuble during the animation but
failed.

****************the original code in David's***********************

onCreateLabel: function(domElement, node) {
(domElement).setHTML(node.name).addEvents({
'click': function(e) {
ht.onClick(e.event);
}
});

**********************************************************************


*******************then I make it as*******************************

onCreateLabel: function(domElement, node) {
(domElement).setHTML(node.name).addEvents({
'click': function(e) {
ht.onClick(e.event ,{
hideLabels: false
});
}
});

**********************************************************************

apparently it doesn't work,
it may be something about the "e.event" ?


Thanks again,

Xocial

Nico Garcia Belmonte

unread,
Oct 15, 2009, 12:17:53 PM10/15/09
to javascript-information...@googlegroups.com
Hi,

His example is using an old version of the library. Also, he's including (an old version of) the MooTools library. So there are many reasons why this code should fail. If you're using a new version of the library and also using a new version of MooTools then I'd suggest you to compare that code to some new hypertree example code (that you can find in the library page) and to read the new mootools (and jit) docs also.
Reply all
Reply to author
Forward
0 new messages