Skip to content
Snippets Groups Projects
Commit c54f7dad authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

send commands to machine

parent e667d7d0
No related branches found
No related tags found
No related merge requests found
......@@ -29,11 +29,12 @@ MenuWrapper = Backbone.View.extend({
this.assemblerMenu = new AssemblerMenuView({model:this.model, assembler: dmaGlobals.assembler});
this.animationMenu = new AnimationMenuView({model:lattice.get("basePlane"), appState:this.model});
this.camMenu = new CamMenuView({model:this.model, lattice:lattice, assembler:dmaGlobals.assembler});
this.sendMenu = new SendMenuView({model:this.model});
//data names and titles
this.designMenuTabs = {lattice:"Lattice", import:"Import", sketch:"Sketch", part:"Part", script:"Script"};
this.simMenuTabs = {physics:"Physics", part:"Part", material:"Material", optimize:"Optimize"};
this.assemMenuTabs = {assembler:"Assembler", animate:"Preview", cam: "Process"};
this.assemMenuTabs = {assembler:"Assembler", animate:"Preview", cam: "Process", send: "Send"};
//bind events
this.listenTo(this.model, "change:currentNav", this.render);
......@@ -83,6 +84,8 @@ MenuWrapper = Backbone.View.extend({
this.animationMenu.render();
} else if (tabName == "cam"){
this.camMenu.render();
} else if (tabName == "send"){
this.sendMenu.render();
} else {
console.warn("no tab initialized!");
$("#menuContent").html('Coming Soon.');//clear out content from menu
......@@ -98,11 +101,11 @@ MenuWrapper = Backbone.View.extend({
},
_populateAndShow: function(){
this.$el.html(this.template(_.extend(this.model.attributes,
this.$el.html(this.template(_.extend(this.model.toJSON(),
{navDesign:this.designMenuTabs,
navSim:this.simMenuTabs,
navAssemble:this.assemMenuTabs,
}, dmaGlobals.lattice.attributes)));
}, dmaGlobals.lattice.toJSON())));
this._updateCurrentTab();
this._show();
},
......
/**
* Created by aghassaei on 3/11/15.
*/
SendMenuView = Backbone.View.extend({
el: "#menuContent",
events: {
},
initialize: function(options){
_.bindAll(this, "render");
},
render: function(){
if (this.model.get("currentTab") != "send") return;
this.$el.html(this.template());
},
template: _.template('\
send commands to machine\
')
});
\ No newline at end of file
......@@ -81,6 +81,7 @@
<script src="js/menus/AssemblerMenuView.js"></script>
<script src="js/menus/AnimationMenuView.js"></script>
<script src="js/menus/CamMenuView.js"></script>
<script src="js/menus/SendMenuView.js"></script>
<script src="js/threeViews/Highlighter.js"></script>
<script src="js/threeViews/ThreeView.js"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment