Commit c0f2b189 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

working on ui

parent 4428ca8a
......@@ -215,7 +215,8 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
isVisible: function(){
var currentTab = appState.get("currentTab");
return (currentTab == "assemblerSetup" || currentTab == "cam" || currentTab == "animate" || currentTab == "send"
var currentNav = appState.get("currentNav");
return (currentTab == "assemblerSetup" || currentTab == "cam" || currentTab == "animate" || currentNav == "navComm"
|| currentTab == "editComponent");
},
......
......@@ -9,6 +9,11 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'te
events: {
"click #streamCommands": "_startStream",
"click #pauseStream": "_pauseStream",
"click #stopMachine": "_stopMachine",
"click #previousLineButton": "_decrementLineNum",
"click #nextLineButton": "_incrementLineNum"
},
......@@ -16,6 +21,35 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'te
this.isStreaming = false;
},
_startStream: function(e){
e.preventDefault();
this.isStreaming = true;
this.render();
},
_pauseStream: function(e){
e.preventDefault();
this.isStreaming = false;
this.render();
},
_stopMachine: function(e){
e.preventDefault();
this.isStreaming = false;
serialComm.send("!");
this.render();
},
_decrementLineNum: function(e){
e.preventDefault();
console.log("prev");
},
_incrementLineNum: function(e){
e.preventDefault();
console.log("next");
},
_makeTemplateJSON: function(){
console.log("render");
return _.extend(serialComm.toJSON(), commPlist, cam.toJSON(), camPlist, {streaming: this.isStreaming});
......
......@@ -10,7 +10,9 @@
<a href="#" id="stopMachine" class="btn pull-right btn-halfWidth btn-lg btn-danger">Stop</a><br/><br/>
Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"></pre><br/><br/>
Out: &nbsp;&nbsp;<input id="sendSerialMessage" value="" placeholder="Send Message" class="seventyFiveWidth form-control unresponsiveInput" type="text"><br/><br/>
Next Line: &nbsp;&nbsp;<input id="nextLine" value="" placeholder="##" class="intInput form-control unresponsiveInput" type="text">Up/down<br/><br/>
Next Line: &nbsp;&nbsp;<input id="nextLine" value="" placeholder="##" class="intInput form-control unresponsiveInput" type="text">
<a href="#" id="previousLineButton" class="btn btn-lg btn-default">Prev</a>
<a href="#" id="nextLineButton" class="btn btn-lg btn-default">Next</a><br/><br/>
<div id="gcodeEditor"><%= dataOut %></div><br/>
<% } %>
<% } else { %>
......
......@@ -117,6 +117,9 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'], fu
this.set("highlighterIsVisible", false);
} else if (navSelection == "navAssemble"){
this.set("highlighterIsVisible", false);
} else if (navSelection == "navComm"){
this.set("basePlaneIsVisible", false);
this.set("highlighterIsVisible", false);
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment