Board Logo

Top root item identification
fr335tyl3r - 12/2/2005 at 04:14 AM

Hi,

I have 4 items as root nodes in the tree, and I need for the top root item to have a different +/- icon than the others (similar to the way the bottom icon is handled).

Is there a way to use a tree item instance variable to change:

icon_50
icon_51
icon_58
icon_59

Or is there an icon_X variable for the top most node?


fr335tyl3r - 12/2/2005 at 04:22 AM

Also,

On the same topic. I have added +/- to the root nodes, but for some reason the "line" that is being used between the root nodes is being changed to the empty (ie, line connecting root node +/-'s when expanded is actualled icon_e instead of icon_l - this has been confirmed as changing icon_e will change the background.

I could turn each of these 4 root elements into an individual tree, but that will remove the relationship between them, and it is not an option for me to have a single top root node.


fr335tyl3r - 12/2/2005 at 05:22 AM

The code that affects it is as follows:

for(i=this.n_depth;i>this.o_root.tmp6;i--)
{
tmpq[i]='<img src="'+this.o_root.a_tpl[tmpr.n_state&33?'icon_e':'icon_l']+'"'+tmpp+' border="0">';
tmpr=tmpr.o_parent
}
this.load();

Changing the code to the following:


for(i=this.n_depth;i>this.o_root.tmp6;i--)
{
if( i-1 == this.o_root.tmp6 )
{
tmpq[i]='<img src="'+this.o_root.a_tpl[tmpr.n_state&33?'icon_e':'icon_l']+'"'+tmpp+' border="0">';
}
else
{
tmpq[i]='<img src="'+this.o_root.a_tpl[tmpr.n_state&33?'icon_e':'icon_l']+'"'+tmpp+' border="0">';
}
tmpr=tmpr.o_parent
}
this.load();

Allows me to seperate the root elements from the rest of the elements (this is addressing the line problem). The only thing I can't undestand is the tmpr.n_state&33 section? It seems that no matter what I change this 33 to, it will always be true?


rock - 12/13/2005 at 02:14 PM

According to license agreement you are strictly NOT allowed (unless specifically authorized by SoftComplex.com) to:
- Decompile or modify the code or header block of script file (tree.js)
- Reverse-engineer the code
See Terms and Conditions


fr335tyl3r - 12/16/2005 at 02:24 AM

My apologies. I have not modified the code. I removed the dotted lines between the root nodes. Apologies for the confusion.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/