From e42d0d897362b04b5ab1fee17467386bf72cc33b Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Mon, 23 Mar 2015 21:03:19 -0400 Subject: [PATCH] organixing --- js/cam/Assembler.js | 3 +++ js/models/AppState.js | 40 +++++++++++++--------------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/js/cam/Assembler.js b/js/cam/Assembler.js index 253c5b98..24b6987e 100644 --- a/js/cam/Assembler.js +++ b/js/cam/Assembler.js @@ -87,8 +87,10 @@ Assembler = Backbone.Model.extend({ if (this.get("machine")) this.get("machine").destroy(); if (machineName == "shopbot"){ this.set("machine", new Shopbot()); + this.set("camProcess", "shopbot"); } else if (machineName == "handOfGod"){ this.set("machine", new Shopbot()); + this.set("camProcess", "gcode"); } else console.warn("selected machine not recognized"); this.set("machineName", machineName); }, @@ -109,6 +111,7 @@ Assembler = Backbone.Model.extend({ _updateCellType: function(){ this.get("machine").updateCellType(); + this.selectMachine("handOfGod");//todo this should go away with dynamic allocation of this model }, _updatePartType: function(){ diff --git a/js/models/AppState.js b/js/models/AppState.js index 31680394..a8d55bad 100644 --- a/js/models/AppState.js +++ b/js/models/AppState.js @@ -78,50 +78,36 @@ AppState = Backbone.Model.extend({ xShape:"X" } }, - tetra: { - vertex: null - }, - cube:{ - face: null - }, - truncatedCube:{ - face: null - }, - kelvin:{ - face: null - } + tetra: {vertex: null}, + cube: {face: null}, + truncatedCube: {face: null}, + kelvin: {face: null} }, allMachineTypes:{ octa:{ - face: { - handOfGod: "Hand of God" - }, - freeformFace: { - handOfGod: "Hand of God" - }, + face: {handOfGod: "Hand of God"}, + freeformFace: {handOfGod: "Hand of God"}, edgeRot: { shopbot: "Shopbot", oneBit: "One Bit Bot", handOfGod: "Hand of God" }, - vertex: { - handOfGod: "Hand of God" - } + vertex: {handOfGod: "Hand of God"} }, tetra: { - handOfGod: "Hand of God" + vertex:{handOfGod: "Hand of God"} }, cube:{ - handOfGod: "Hand of God" + face:{handOfGod: "Hand of God"} }, truncatedCube:{ - handOfGod: "Hand of God" + face:{handOfGod: "Hand of God"} }, kelvin:{ - handOfGod: "Hand of God" - }, - will: "Electronics Assembler" + face:{handOfGod: "Hand of God"} + } +// will: "Electronics Assembler" }, allAssemblyStrategies: { raster: "Raster" -- GitLab