INNER CODE UNIT · JavaScript

xstep

hms-dbmi/scde · web/pathcl_canvas.js:729

	var xstep=width/d.order.length;
	var lp,lpy,rp,rpy,jx,jy;
	var maxHeight=Math.max.apply(null, d.height);
	var heightScale=height/maxHeight;
	ctx.beginPath();

	for(var i=0, mergex=[]; i<nmerges; i++) {
	    jy=y+(maxHeight-d.height[i])*heightScale;
	    lp=d.merge[i]; // left position (starts as an index)
	    if(lp<0) { // leaf
		lp=d.order[-1*lp-1]; 
		lp=x+(lp-0.5)*xstep;
		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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…