diff --git a/.DS_Store b/.DS_Store index 33cd7fd..261b247 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/graph.js b/graph.js index 7eac8d7..e08ffac 100644 --- a/graph.js +++ b/graph.js @@ -152,7 +152,7 @@ var rect = layer.selectAll("rect") .attr("y", height) .attr("width", x.rangeBand()) .attr("height", 0) - .style("fill", function(d, i) {return meatType=='False'? color[meatType](data[i][d.y0]/tempMax):this.style("fill")}) + .style("fill", function(d, i) {return meatType=='False'? color[meatType](data[i][d.y0]/tempMax):""}) .on("mouseover", function() { if(meatType!='False'){ var rects = d3.select(this); @@ -191,8 +191,8 @@ var line=parseInt((event.pageX-parseFloat($("body").css('margin-left'))-margin.l .style("stroke", "grey"); //console.log(d3.event.pageX-parseFloat($("body").css('margin-left'))); var ttip=d3.select('.tooltip'); - // ttip.html(data[line][pos].toFixed(2)+ "\xB0C") - ttip.html(line.toFixed(2)+ "\xB0C") + ttip.html(data[line][pos].toFixed(2)+ "\xB0C") + // ttip.html(line.toFixed(2)+ "\xB0C") //ttip.html("please work") .style("opacity", 1) .style("left", (d3.event.pageX-parseFloat($("body").css('margin-left'))+5) + "px") diff --git a/heat-diffusion.js b/heat-diffusion.js index 9adc8af..b59b7a8 100644 --- a/heat-diffusion.js +++ b/heat-diffusion.js @@ -206,22 +206,22 @@ function HeatSolver(startingTemps,timestep,spacestep){ for(var i=0; i<60*step; i+=step){ grapharray.push(tempArray[parseInt(i)].slice(1,len-1)); - + if(temperatures[parseInt(i)][0] > 25 && temperatures[parseInt(i)][1] > 25){ - + graphlabels.push([count,0,temperatures[parseInt(i)][0]]); graphlabels.push([count,1,temperatures[parseInt(i)][1]]); - + } else if(temperatures[parseInt(i)][0] > 25){ - + graphlabels.push([count,0,temperatures[parseInt(i)][0]]); - + } else if(temperatures[parseInt(i)][1] > 25){ - + graphlabels.push([count,1,temperatures[parseInt(i)][1]]); - + } else{ // graphlabels.push([count,0,temperatures[parseInt(i/60)][1]]); @@ -229,7 +229,7 @@ function HeatSolver(startingTemps,timestep,spacestep){ count++; - + } @@ -279,40 +279,41 @@ function HeatSolver(startingTemps,timestep,spacestep){ } var cnVector = make_crank_nicolson_vector(); calculate_next_cn(cnVector); - var newMaxTemp = []; - for(var n=0; n maxTemps[maxTemps.length-1][n]){ - newMaxTemp.push(tempArray[tempArray.length-1][n]); - } - else{ - newMaxTemp.push(maxTemps[maxTemps.length-1][n]) - } - } - maxTemps.push(newMaxTemp); } } var arrays = tempArray.length-1 ; var len= tempArray[0].length; var step = arrays/60.0; for(var i=0; i<60*step; i+=step){ + + var newMaxTemp = []; + for(var n=0; n maxTemps[maxTemps.length-1][n]){ + newMaxTemp.push(tempArray[parseInt(i)][n]); + } + else{ + newMaxTemp.push(maxTemps[maxTemps.length-1][n]) + } + } + maxTemps.push(newMaxTemp); grapharray.push(tempArray[parseInt(i)].slice(1,len-1)); - + if(temperatures[parseInt(i)][0] > 25 && temperatures[parseInt(i)][1] > 25){ - + graphlabels.push([count,0,temperatures[parseInt(i)][0]]); graphlabels.push([count,1,temperatures[parseInt(i)][1]]); - + } else if(temperatures[parseInt(i)][0] > 25){ - + graphlabels.push([count,0,temperatures[parseInt(i)][0]]); - + } else if(temperatures[parseInt(i)][1] > 25){ - + graphlabels.push([count,1,temperatures[parseInt(i)][1]]); - + } else{ // graphlabels.push([count,0,temperatures[parseInt(i/60)][1]]); @@ -320,7 +321,7 @@ function HeatSolver(startingTemps,timestep,spacestep){ count++; - + } return {temps: grapharray, points: graphlabels, step: step, maxTemps: maxTemps[maxTemps.length-1], allMaxTemps: maxTemps}; diff --git a/home-screen.css b/home-screen.css index 0cdaaac..1f6ac2f 100644 --- a/home-screen.css +++ b/home-screen.css @@ -11,8 +11,8 @@ border: 1px solid black; } -#startModal .modal-footer{ - text-align:center; +.modal-footer{ + text-align:center !important; } /*.dropdown{ diff --git a/perfectSteak.js b/perfectSteak.js index 18a97fd..492b10a 100644 --- a/perfectSteak.js +++ b/perfectSteak.js @@ -262,7 +262,11 @@ var onoff=function(){ tog.on("click",onoff); var addTextButton = $(""); var saveModal=$(''); - displayDiv.append(saveModal) + var cookDropdown=$(""); + + var quickAddModal=$(''); + $(".cookp").append(cookDropdown); + displayDiv.append(saveModal, quickAddModal) saveBut.on("click", function(){ diff --git a/sample.js b/sample.js index 19596d5..db89ab3 100644 --- a/sample.js +++ b/sample.js @@ -17,16 +17,20 @@ var calculate=function(data,steak,meatType,first,totalTime){ if(timestep > 39){ //39 is basically the maximum timestep for acceptable accuracy (below 1° error) timestep = 39; } - var myheatsolver = HeatSolver(steak,timestep,spacestep); var Thedata=myheatsolver.sixty_graph_arrays_duration(data); if(meatType=='False'){ var sampledata=Thedata.temps; } else{ - var sampledata=Thedata.allMaxTemps; - console.log(sampledata.length); + var sampledata=Thedata.allMaxTemps.slice(1,Thedata.allMaxTemps.length); + console.log(sampledata); + + for(var i=0;i