Further clean up code.

This commit is contained in:
Jürg Lehni 2013-05-24 17:43:49 -07:00
parent 1eb1580112
commit f33d49acc1

View file

@ -798,13 +798,13 @@ function plotD_vs_t( x, y, arr, arr2, v, dmin, dmax, tmin, tmax, yscale, tvalue
drawFatline(v);
window.__p3.push(new Path.Line(x, y + dmin * yscale, x + 200, y + dmin * yscale));
window.__p3[window.__p3.length-1].style.strokeColor = '#000'
window.__p3[window.__p3.length-1].style.strokeColor = '#000';
window.__p3.push(new Path.Line(x, y + dmax * yscale, x + 200, y + dmax * yscale));
window.__p3[window.__p3.length-1].style.strokeColor = '#000'
window.__p3[window.__p3.length-1].style.strokeColor = '#000';
window.__p3.push(new Path.Line(x + tmin * 190, y-100, x + tmin * 190, y+100));
window.__p3[window.__p3.length-1].style.strokeColor = clr
window.__p3[window.__p3.length-1].style.strokeColor = clr;
window.__p3.push(new Path.Line(x + tmax * 190, y-100, x + tmax * 190, y+100));
window.__p3[window.__p3.length-1].style.strokeColor = clr
window.__p3[window.__p3.length-1].style.strokeColor = clr;
for (var i = 0; i < arr.length; i++) {
window.__p3.push(new Path.Line(new Point(x + arr[i][0] * 190, y + arr[i][1] * yscale),
@ -816,11 +816,13 @@ function plotD_vs_t( x, y, arr, arr2, v, dmin, dmax, tmin, tmax, yscale, tvalue
for (var i = 0; i < arr2.length; i++) {
pnt.push(new Point(x + arr2x[i] * 190, y + arr2[i] * yscale));
window.__p3.push(new Path.Circle(pnt[pnt.length-1], 2));
window.__p3[window.__p3.length-1].style.fillColor = '#000'
window.__p3[window.__p3.length-1].style.fillColor = '#000';
}
// var pth = new Path(pnt[0], pnt[1], pnt[2], pnt[3]);
// pth.closed = true;
window.__p3.push( new Path( new Segment(pnt[0], null, pnt[1].subtract(pnt[0])), new Segment( pnt[3], pnt[2].subtract(pnt[3]), null ) ) );
window.__p3[window.__p3.length-1].style.strokeColor = clr
window.__p3.push(new Path(
new Segment(pnt[0], null, pnt[1].subtract(pnt[0])),
new Segment(pnt[3], pnt[2].subtract(pnt[3]), null)));
window.__p3[window.__p3.length-1].style.strokeColor = clr;
view.draw();
}