baseopttreenode.lzx
<library>
<class name="baseopttreenode">
<attribute name="dopen" value="$path{ parent.openattrpath }" type="boolean"/>
<attribute name="open" value="${ dopen }"/>
<attribute name="ddepth" value="$path{ parent.depthattrpath }" type="number"/>
<attribute name="depth" value="${ ddepth }"/>
<attribute name="highlight" value="null
"/>
<attribute name="indent" value="10
"/>
<attribute name="x" value="${ depth * indent }"/>
<datapath replication="lazy"/>
<attribute name="startdragdel" value="null
"/>
<attribute name="dragging" value="false
"/>
<handler name="onmousedown">
if ( !this.startdragdel ){
this.startdragdel = new lz.Delegate( this, 'startDrag' );
}
lz.Timer.resetTimer( startdragdel, startdragdelay);
this._ix = this.getMouse( 'x' );
this._iy = this.getMouse( 'y' );
</handler>
<attribute name="startdragdelay" value="800
"/>
<method name="startDrag" args="ignore=null">
this.setAttribute( "dragging", true );
parent.beginDrag( this , this._ix, this._iy );
</method>
<handler name="onmouseup">
lz.Timer.removeTimer( startdragdel );
if ( dragging ){
parent.endDrag( this );
this.setAttribute( "dragging", false );
}
</handler>
<method name="checkChildren">
// abstract method
</method>
</class>
</library>