From 501183e48360206c7ed77499fbe126d8275a11e2 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Wed, 1 Apr 2015 17:28:51 -0400 Subject: [PATCH] demo chages --- data/demos/oneBitBot.json | 2 +- index.html | 1 - js/models/AppState.js | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/demos/oneBitBot.json b/data/demos/oneBitBot.json index 0c3a3469..d3470a64 100644 --- a/data/demos/oneBitBot.json +++ b/data/demos/oneBitBot.json @@ -1 +1 @@ -{"lattice":{"units":"inches","cells":[[[{"indices":{"x":-2,"y":-2,"z":-1}},null],[{"indices":{"x":-2,"y":-1,"z":-1}},null],[{"indices":{"x":-2,"y":0,"z":-1}},null]],[[{"indices":{"x":-1,"y":-2,"z":-1}},null],[{"indices":{"x":-1,"y":-1,"z":-1}},{"indices":{"x":-1,"y":-1,"z":0}}],[{"indices":{"x":-1,"y":0,"z":-1}},{"indices":{"x":-1,"y":0,"z":0}}]],[[{"indices":{"x":0,"y":-2,"z":-1}},null],[{"indices":{"x":0,"y":-1,"z":-1}},{"indices":{"x":0,"y":-1,"z":0}}],[{"indices":{"x":0,"y":0,"z":-1}},{"indices":{"x":0,"y":0,"z":0}}]]],"cellsMin":{"x":-2,"y":-2,"z":-1},"cellsMax":{"x":0,"y":0,"z":0},"numCells":13,"scale":2.78388,"cellSeparation":{"xy":0,"z":0},"cellType":"octa","connectionType":"edgeRot","partType":"vox"},"assembler":{"camStrategy":"raster","placementOrder":"XYZ","camProcess":"gcode","machineName":"oneBitBot","dataOut":"","needsPostProcessing":false,"editsMadeToProgram":false,"rapidHeight":5.56776,"rapidHeightRelative":true,"safeHeight":0.5,"originPosition":{"x":1.3919,"y":1.3919,"z":0},"stockPosition":{"x":4.482,"y":0,"z":3.1736},"stockPositionRelative":true,"stockFixed":true,"multipleStockPositions":false,"stockArraySize":{"x":4,"y":4},"stockSeparation":2.78388,"rapidSpeeds":{"xy":3,"z":2},"feedRate":{"xy":0.1,"z":0.1}}} \ No newline at end of file +{"lattice":{"units":"inches","cells":[[[{"indices":{"x":-2,"y":-2,"z":-1}},null],[{"indices":{"x":-2,"y":-1,"z":-1}},null],[{"indices":{"x":-2,"y":0,"z":-1}},null]],[[{"indices":{"x":-1,"y":-2,"z":-1}},null],[{"indices":{"x":-1,"y":-1,"z":-1}},{"indices":{"x":-1,"y":-1,"z":0}}],[{"indices":{"x":-1,"y":0,"z":-1}},{"indices":{"x":-1,"y":0,"z":0}}]],[[{"indices":{"x":0,"y":-2,"z":-1}},null],[{"indices":{"x":0,"y":-1,"z":-1}},{"indices":{"x":0,"y":-1,"z":0}}],[{"indices":{"x":0,"y":0,"z":-1}},{"indices":{"x":0,"y":0,"z":0}}]]],"cellsMin":{"x":-2,"y":-2,"z":-1},"cellsMax":{"x":0,"y":0,"z":0},"numCells":13,"scale":2.78388,"cellSeparation":{"xy":0,"z":0},"cellType":"octa","connectionType":"edgeRot","partType":"vox"},"assembler":{"camStrategy":"raster","placementOrder":"XYZ","camProcess":"gcode","machineName":"oneBitBot","dataOut":"","needsPostProcessing":false,"editsMadeToProgram":false,"rapidHeight":5.56776,"rapidHeightRelative":true,"safeHeight":0.5,"originPosition":{"x":1.3919,"y":1.3919,"z":0},"stockPosition":{"x":4.482,"y":1.3919,"z":3.1736},"stockPositionRelative":true,"stockFixed":true,"multipleStockPositions":false,"stockArraySize":{"x":4,"y":4},"stockSeparation":2.78388,"rapidSpeeds":{"xy":3,"z":2},"feedRate":{"xy":0.1,"z":0.1}}} \ No newline at end of file diff --git a/index.html b/index.html index 6e44cc83..60898e3d 100644 --- a/index.html +++ b/index.html @@ -116,7 +116,6 @@ <a tabindex="-1">Demo Files<span class="pull-right fui-arrow-right"></span></a> <ul class="dropdown-menu"> <li><a data-file="oneBitBot.json" class="savedDemo" href="#">One Bit Assembly</a></li> - <li><a data-file="" class="savedDemo" href="#">Demo2</a></li> </ul> <li class="divider"></li> <li class="dropdown-submenu"> diff --git a/js/models/AppState.js b/js/models/AppState.js index ca835c4c..4e51b2d0 100644 --- a/js/models/AppState.js +++ b/js/models/AppState.js @@ -187,6 +187,7 @@ AppState = Backbone.Model.extend({ var currentTab = this.get("currentTab"); if (currentTab != "animate") this.set("stockSimulationPlaying", false); if (currentTab != "cam") this.set("manualSelectOrigin", false); + if (currentTab == "import" && dmaGlobals.lattice.get("connectionType") == "edgeRot") dmaGlobals.lattice.set("partType", "voxLowPoly"); this._storeTab(this.get("currentNav"), currentTab); }, @@ -198,7 +199,7 @@ AppState = Backbone.Model.extend({ _updateCellMode: function(){ var currentTab = this.get("currentTab"); - if (currentTab == "lattice") this.set("cellMode", "cell"); + if (currentTab == "lattice" || currentTab == "import") this.set("cellMode", "cell"); //else if (currentTab == "import") this.set("cellMode", "cell"); //else if (currentTab == "sketch") this.set("cellMode", "cell"); else if (currentTab == "part") this.set("cellMode", "part"); @@ -243,7 +244,7 @@ AppState = Backbone.Model.extend({ e.preventDefault(); e.stopPropagation(); case 16://shift - this.set("shift", state); +// this.set("shift", state); break; case 68://d delete mode this.set("deleteMode", state); -- GitLab