INNER CODE UNIT · JavaScript
lpy
hms-dbmi/scde · web/pathcl_canvas.js:741
lpy=y+height;
} else { // inner node
lpy=y+(maxHeight-d.height[lp-1])*heightScale; lp=mergex[lp-1];
}
i++; rp=d.merge[i]; // right position
if(rp<0) { // leaf
rp=d.order[-1*rp-1];
rp=x+(rp-0.5)*xstep;
rpy=y+height;
} else { // inner node
rpy=y+(maxHeight-d.height[rp-1])*heightScale; rp=mergex[rp-1];
}
jx=(lp+rp)/2; jy=y+(maxHeight-d.height[(i-1)/2])*heightScale;
mergex.push(jx);
ctx.moveTo(lp,lpy); ctx.lineTo(lp,jy); ctx.lineTo(rp,jy); ctx.lineTo(rp,rpy);
}
ctx.lineWidth=1.5; ctx.lineJoin='miter'; ctx.strokeStyle='black'; ctx.stroke();