From 2bb6ae985ee9d77bc44dcdafc438a78bfa655d66 Mon Sep 17 00:00:00 2001 From: stephensm Date: Mon, 5 Aug 2013 12:18:45 -0400 Subject: [PATCH] The scroll to bottom now works --- drawSaved.js | 31 ++++++++++++++------- graph.js | 4 +-- perfectSteak.js | 71 ++++++++++++++++++++++++++++--------------------- 3 files changed, 65 insertions(+), 41 deletions(-) diff --git a/drawSaved.js b/drawSaved.js index 341e7cd..ab95a55 100644 --- a/drawSaved.js +++ b/drawSaved.js @@ -1,5 +1,5 @@ -var drawFinished=function(myMeatType,myMaxTemps) +var drawFinished=function(myMeatType,myMaxTemps,instructions,startingtemp) { var getState=function(temp) { @@ -11,6 +11,13 @@ var drawFinished=function(myMeatType,myMaxTemps) return 6; }; + var directions=[myMeatType+" starts at "+startingtemp+ "\xB0C"]; + for(var i=0;i
") //======= - div.append("
") + div.append("
") //>>>>>>> 98101b5e50ec50526ddb403f94f4d68ebcd1d185 $(".table-container").append(displayDiv); @@ -323,34 +323,40 @@ var toF=function(C) var step2Col = $(""); step2Col.append(inp2); step1Col.append(flipButton); -//<<<<<<< HEAD -//======= -//>>>>>>> 98101b5e50ec50526ddb403f94f4d68ebcd1d185 row.append(duration, step1Col, step2Col); inputTable.append(row); if (i == model.currentInfo["numRows"] - 1) { inputTable.append(addButton); -//>>>>>>> 98101b5e50ec50526ddb403f94f4d68ebcd1d185 + } + var sumtime=0; + var time=$("#row" + i + "time").val().replace(':','.').split('.'); + for (var k=0;k"); var i = model.currentInfo["numRows"] - 1; var row = $(""); - + if(i>0){ var vals=parseFloat($("#row" + (i-1) + "time").val()); -//>>>>>>> 98101b5e50ec50526ddb403f94f4d68ebcd1d185 - //var info=$("#timeCol"+(i-1)).html(); - //info = info.replace(":", ".").split('.'); - - //vals=vals+60*parseFloat(info[0])+parseFloat(info[1]); - //var minSecs=model.convertTime(vals); - } - //else{ - //var minSecs=model.convertTime(i*timeStep); - //} - - - //var timeCol=$(""+minSecs+""); var duration = $(""); var inp1 = $(""); @@ -396,12 +389,23 @@ var toF=function(C) step2Col.append(inp2); step1Col.append(flipButton); row.append(duration, step1Col, step2Col); + $('#theTable').stop().animate({ + scrollTop: $("#theTable")[0].scrollHeight +}, 800); + console.log($("#theTable").scrollTop()); timeFun(i); flipButtonFun(i); table.append(row); inp1.val($("#inp1_" + (i-1)).val()); inp2.val($("#inp2_" + (i-1)).val()); - model.dataAdd([parseFloat($("#row" + i + "time").val()), parseFloat($("#inp1_" + i).val()), parseFloat($("#inp2_" + i).val())]) + var sumtime=0; + var time=$("#row" + i + "time").val().replace(':','.').split('.'); + for (var k=0;k1){ + var sumtime=parseFloat(time[1]); + + sumtime+=parseFloat(60*time[0]); + } + else{var sumtime=parseFloat(time[0]);} + + console.log(sumtime); + model.dataAdd([sumtime, cur1, cur2]); } var OKtoCook=true; //IF WE HAVE INVALID INPUTS, IT WILL BE CHANGED TO FALSE