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

matt user settings

parent 260d2fa1
Branches
No related tags found
No related merge requests found
{"lattice":{"units":"inches","scale":2.78388,"cellSeparation":{"xy":0,"z":0},"cellType":"octa","connectionType":"edgeRot","partType":"vox","shouldPreserveCells":true},"assembler":{"camStrategy":"raster","placementOrder":"-X-YZ","camProcess":"gcode","machineName":"oneBitBot","rapidHeight":6.9,"rapidHeightRelative":true,"safeHeight":0.5,"originPosition":{"x":-1.39194,"y":1.39194,"z":0},"stockPosition":{"x":5.6081,"y":1.3919,"z":2},"stockPositionRelative":true,"multipleStockPositions":false,"stockArraySize":{"x":4,"y":4},"stockSeparation":2.78388,"rapidSpeeds":{"xy":6,"z":4},"feedRate":{"xy":0.1,"z":0.1},"simSpeed":4,"simStockNum":0,"stockHeight":0}}
\ No newline at end of file
......@@ -116,6 +116,7 @@
<ul class="dropdown-menu">
<!--<li><a id="resetDefaultSettings" href="#">Reset Settings</a></li>-->
<li><a data-file="ben.user" class="savedUserSettings" href="#">Ben</a></li>
<li><a data-file="matt.user" class="savedUserSettings" href="#">Matt</a></li>
<li><a class="importJSON" href="#">From File...</a></li>
</ul>
</li>
......
......@@ -75,12 +75,13 @@ Assembler = Backbone.Model.extend({
this.listenTo(options.lattice, "change:partType", this._updatePartType);
this.listenTo(options.lattice, "change:cellType change:connectionType", this._updateCellType);
this.listenTo(options.appState, "change:cellMode", this._updateCellMode);
this.listenTo(this, "change:machineName", this.selectMachine);
this._initOriginAndStock();
},
selectMachine: function(machineName){//todo put this on event - that way you know it is a change
if (!machineName) machineName = this.get("machineName");
selectMachine: function(){
var machineName = this.get("machineName");
if (this.get("machine")) this.get("machine").destroy();
if (machineName == "shopbot"){
this.set("machine", new Shopbot());
......@@ -92,7 +93,6 @@ Assembler = Backbone.Model.extend({
this.set("machine", new OneBitBot());
this.set("camProcess", "gcode");
}else console.warn("selected machine not recognized");
this.set("machineName", machineName);
},
makeProgramEdits: function(data){
......@@ -111,7 +111,8 @@ Assembler = Backbone.Model.extend({
_updateCellType: function(){
this.get("machine").updateCellType();
this.selectMachine("handOfGod");//todo this should go away with dynamic allocation of this model
this.set("machineName", "handOfGod");//todo this should go away with dynamic allocation of this model
},
_updatePartType: function(){
......
......@@ -48,7 +48,7 @@ AssemblerMenuView = Backbone.View.extend({
_selectMachine: function(e){
e.preventDefault();
this.assembler.selectMachine($(e.target).data("type"));
this.assembler.set("MachineName", $(e.target).data("type"));
},
render: function(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment