10c10 < --- > 54d53 < var opop = null, sipos = null; 78d76 < var initialbearing = 0.000; 180,187d177 < function buttonideas() { < var crotate1 = " "; < for (var steps=0; steps<=360; steps++) { < crotate1=crotate1.replace("", ""); < } < return crotate1; < } < 189c179 < var xxoff = 0.0, yyoff = 0.0, cdelim = "", idelim = "", maxx = 300.0, maxy = 400.0, inx = 0.0, iny = 0.0, xz = 0.0, ah = 0.0; --- > var xxoff = 0.0, yyoff = 0.0, cdelim = "", idelim = "", maxx = 400, maxy = 400, inx = 0.0, iny = 0.0, xz = 0.0, ah = 0.0; 241,247c231,233 < // alert(55 + " " + newcoords[jijk]); < if (parseFloat(eval(newcoords[jijk] - (yyoff))) > parseFloat(maxy)) { < //alert(56 + " " + newcoords[jijk]); < maxy = parseFloat(eval(newcoords[jijk] - (yyoff))); < } < } else if (parseFloat(eval(newcoords[jijk] - (xxoff))) > parseFloat(maxx)) { < maxx = parseFloat(eval(newcoords[jijk] - (xxoff))); --- > if (eval(newcoords[jijk]) > eval(maxy)) maxy = parseFloat(newcoords[jijk]); > } else if (eval(newcoords[jijk]) > eval(maxx)) { > maxx = parseFloat(newcoords[jijk]); 250,257c236,237 < if (opop != null) { < opop = opop; < //opop.close(); < //opop = null; < } else { < //alert(maxy); < opop = window.open("", "Polygon " + numlegs, "left=400,top=250,height=" + parseFloat(50 + maxy) + ",width=" + parseFloat(50 + maxx)); < var myhtml = "Polygon " + numlegs + "

Perimeter: " + (initiallength * numlegs) + "  Area: " + area + "


" + buttonideas() + "
Sorry, your browser does not support inline SVG."; --- > var opop = window.open("", "Polygon " + numlegs, "left=20,top=20,height=" + parseFloat(50 + maxy) + ",width=" + parseFloat(10 + maxx)); > var myhtml = "Polygon " + numlegs + "

Perimeter: " + (initiallength * numlegs) + "  Area: " + area + "


Sorry, your browser does not support inline SVG."; 259d238 < } 272d250 < document.getElementById("firstBearing").value = initialbearing; 282,294d259 < function posval(inval) { < if (eval(inval) < 0.0) { < inval=parseFloat(inval); < while (eval(inval) < 0.000) { < inval += 360.0; < } < } else if (eval(inval) >= 360.0) { < inval=parseFloat(inval); < inval -= 360.0; < } < return inval; < } < 297d261 < initialbearing = posval(location.search.split('bearing=')[1] ? location.search.split('bearing=')[1].split('&')[0] : 0.000); 304d267 < sipos = setInterval(takealook, 5000); 306c269 < numlegs = prompt("Please tell me how many Shape/Traverse equal sides/legs you have (optionally add a side length, and initial bearing in degrees (comma separated))", "4,100"); --- > numlegs = prompt("Please tell me how many Shape/Traverse equal sides/legs you have (optionally add a side length (comma separated))", "4,300"); 308,314c271,272 < sipos = setInterval(takealook, 5000); < if (numlegs.indexOf(",") != -1) { < var wl = window.location + "?sides=" + numlegs.replace(",", ";0&length="); < if (wl.indexOf(",") != -1) { < wl = wl.replace(",", "&bearing="); < } < window.location = wl.replace(";", ","); --- > if (numlegs.indexOf(",") != -1) { > window.location = window.location + "?sides=" + numlegs.replace(",", ",0&length="); 416c374 < x360 = eval(x360 - 360.0); --- > x360 = eval(x360-360.0); 489c447 < x360 = eval(x360 - 360.0); --- > x360 = eval(x360-360.0); 493c451 < areal = eval(areal - 360.0); --- > areal = eval(areal-360.0); 501,521c459,461 < var preEall = document.getElementById('Eall').innerHTML; < var preNall = document.getElementById('Nall').innerHTML; < < var xoff = []; < if (preEall != null) { < if (preEall == "") { < preEall = null; < } else { < xoff=eval(preEall); < } < } < var yoff = []; < if (preNall != null) { < if (preNall == "") { < preNall = null; < } else { < yoff=eval(preNall); < } < } < < if (preEall != null && preNall != null) { --- > var xoff = eval(document.getElementById('Eall').innerHTML); > var yoff = eval(document.getElementById('Nall').innerHTML); > 526d465 < } 717,735d655 < < function takealook() { < var things; < if (opop != null) { < if (opop.document.getElementById('myunload').value.indexOf(",") != -1) { < things = opop.document.getElementById('myunload').value.split(","); < opop.close(); < opop = null; < if (things.length >= 3) { < if (sipos != null) { clearInterval(sipos); sipos = null; } < var bis = 0.0; < bis += parseFloat(initialbearing); < bis += parseFloat(things[2]); < window.location = "./ShapeDraw.php?sides=" + things[1] + ",0&length=" + things[0] + "&bearing=" + posval(bis); < } < } < } < } < 737c657 < --- > 752d671 <