/* 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 */ /** * @desc: enables smart rendering mode (usefull for big trees with lots f items on each level) * @edition: professional * @type: public */ dhtmlXTreeObject.prototype.enableSmartRendering=function(){ this.enableSmartXMLParsing(true); this._srnd=true; this.itemHeight=18; var that=this; this.allTree.onscroll=function(){ if (that._srndT) return; that._srndT=window.setTimeout(function(){ that._srndT=null; that._renderState(); },300); }; this.attachEvent("onXLE",function(){ that._renderState(); }); this._singleTimeSRND(); } dhtmlXTreeObject.prototype._renderState=function(){ //var z=this.allTree.parentNode; //var t=z.removeChild(this.allTree); if (!this._idpull[this.rootId]._sready) this.prepareSR(this.rootId,true); var top=this.allTree.scrollTop; var pos=Math.floor(top/this.itemHeight); var height=Math.ceil(this.allTree.offsetHeight/this.itemHeight); this._group_render=true; this._getItemByPos(top,this.itemHeight,height,null,false,this._renderItemSRND); this._group_render=false; //z.appendChild(this.allTree); } dhtmlXTreeObject.prototype._renderItemSRND=function(a,b){ if (!a.span){ //render row a.span=-1; var z=a.parentObject.htmlNode.childNodes[0].childNodes; var count=b*this.itemHeight; var x=null; for (var i=1; i1){ if ( ( (Nodes[1].style.display!="none") || (mode==1) ) && (mode!=2) ) { //nb:solves standard doctype prb in IE this.allTree.childNodes[0].border = "1"; this.allTree.childNodes[0].border = "0"; var nodestyle="none"; itemObject._open=false; } else { var nodestyle=""; itemObject._open=true; } for (var i=1; i