diff --git a/js/menus/ImportMenuView.js b/js/menus/ImportMenuView.js index d5c6d38965d3c49b7c5a40b0352e4f45bb894b75..c2d46acb32e431ad9abab82c5a45a662ac24852a 100644 --- a/js/menus/ImportMenuView.js +++ b/js/menus/ImportMenuView.js @@ -20,11 +20,13 @@ ImportMenuView = Backbone.View.extend({ }, template: _.template('\ + Filename:<br/>\ Rotate:<br/>\ Scale:<br/><br/>\ <span class="btn btn-default btn-file fullWidth">\ Upload STL<input id="uploadMesh" type="file">\ - </span><br/><br/>\ + </span><br/>\ + <div class="text-center">OR</div>\ <div class="btn-group fullWidth">\ <button data-toggle="dropdown" class="btn btn-default dropdown-toggle fullWidth" type="button">Select Model <span class="caret"></span></button>\ <ul role="menu" class="dropdown-menu">\ diff --git a/js/menus/MenuWrapper.js b/js/menus/MenuWrapper.js index 0c84bba1545caea44f376fc415a09ae81b5b7603..f46f089f96c314a4b86bab453bb5a222f9b30270 100644 --- a/js/menus/MenuWrapper.js +++ b/js/menus/MenuWrapper.js @@ -11,7 +11,7 @@ function MenuWrapper(args){ var latticeMenu = new LatticeMenuView({model:args.lattice}); var importMenu = new ImportMenuView(); var sketchMenu = new SketchMenuView(); - var partMenu = new PartMenuView(); + var partMenu = new PartMenuView({model:args.lattice}); var scriptMenu = new ScriptMenuView(); init(); diff --git a/js/menus/PartMenuView.js b/js/menus/PartMenuView.js index 540b8b3fbcd289f3618002b73245167713cad44b..602b9bca4e605c5a2ea70f14d7c095d3bb568c38 100644 --- a/js/menus/PartMenuView.js +++ b/js/menus/PartMenuView.js @@ -12,14 +12,15 @@ PartMenuView = Backbone.View.extend({ initialize: function(){ _.bindAll(this, "render"); + this.listenTo(this.model, "change:partType", this.render); }, render: function(){ - this.$el.html(this.template()); + this.$el.html(this.template(this.model.attributes)); }, template: _.template('\ - Part Type: <br/>\ + Part Type: <%= partType %><br/>\ ') }); \ No newline at end of file diff --git a/js/models/lattice.js b/js/models/lattice.js index 9831811418ee37fa6a533d0f81907029b13583fa..4518fb1d168cf43d668dde628977eade76b843dd 100644 --- a/js/models/lattice.js +++ b/js/models/lattice.js @@ -11,7 +11,8 @@ Lattice = Backbone.Model.extend({ connectionType: "face", nodes: [], cells: [], - numCells: 0 + numCells: 0, + partType: "triangle" }, //pass in fillGeometry