/* Product Name: dhtmlxSuite Version: 4.0.3 Edition: Professional License: content of this file is covered by DHTMLX Commercial or Enterprise license. Usage without proper license is prohibited. To obtain it contact sales@dhtmlx.com Copyright UAB Dinamenta http://www.dhtmlx.com */ dhtmlXTreeObject.prototype.addPath=function(sid,tid,style,id){ //sid on top, tid in deep this.activatePaths(); style=style||{}; var path=[]; var to=null; var from=this._idpull[tid]; var end=this._idpull[sid]; while (end!=to){ path.push({open:this._getOpenState(from), from:from.id, size:(to?this._getIndex(to):0), to:(to?to.id:null), style:"border-left:"+(style.width||1)+"px "+(style.mode||"solid")+" "+(style.color||"red")+"; border-bottom:"+(style.width||1)+"px "+(style.mode||"solid")+" "+(style.color||"red")+";"}) to=from; from=from.parentObject; } while (!id || this._pathspull[id]) id=(id||0)+1; this._pathspull[id]={path:path,id:id}; this._paths.push(this._pathspull[id]); this._renderPath(this._pathspull[id]) }; dhtmlXTreeObject.prototype.activatePaths=function(height){ var that=this; this.attachEvent("onOpenEnd",function(){ for (var i=0; i0; i--){ var t=obj.path[i]; if (t._html) t._html.parentNode.removeChild(t._html); t._html=null; } } dhtmlXTreeObject.prototype._renderPath=function(obj){ var c=this._idpull[obj.path[obj.path.length-1].from].span.parentNode.parentNode; var top=(_isIE?9:8)+this._halfHeight; var left=(_isIE?27:27); while(c.offsetParent!=this.allTree){ top+=c.offsetTop; left+=c.offsetLeft; c=c.offsetParent; } for (var i=obj.path.length-1; i>0; i--){ var t=obj.path[i]; var d=document.createElement("div"); if (!this._idpull[t.to].tr.offsetHeight) return; var pos=this._idpull[t.to].tr.offsetTop; d.style.cssText='position:absolute; z-index:1; width:'+(_isIE?10:8)+'px; height:'+(pos-9)+'px; left:'+left+'px; top:'+top+'px;'+t.style; top+=pos; left+=18; this.allTree.appendChild(d); t._html=d; } } dhtmlXTreeObject.prototype.deletePath=function(id){ var z=this._pathspull[id]; if (z){ this._clearPath(z); delete this._pathspull[id]; for (var i=0; i=0; i--) this.deletePath(this._paths[i].id); }; dhtmlXTreeObject.prototype._paths=[]; dhtmlXTreeObject.prototype._pathspull={}; //(c)dhtmlx ltd. www.dhtmlx.com