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

small changes

parent 76aee15d
No related branches found
No related tags found
No related merge requests found
...@@ -20,11 +20,13 @@ ImportMenuView = Backbone.View.extend({ ...@@ -20,11 +20,13 @@ ImportMenuView = Backbone.View.extend({
}, },
template: _.template('\ template: _.template('\
Filename:<br/>\
Rotate:<br/>\ Rotate:<br/>\
Scale:<br/><br/>\ Scale:<br/><br/>\
<span class="btn btn-default btn-file fullWidth">\ <span class="btn btn-default btn-file fullWidth">\
Upload STL<input id="uploadMesh" type="file">\ Upload STL<input id="uploadMesh" type="file">\
</span><br/><br/>\ </span><br/>\
<div class="text-center">OR</div>\
<div class="btn-group fullWidth">\ <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>\ <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">\ <ul role="menu" class="dropdown-menu">\
......
...@@ -11,7 +11,7 @@ function MenuWrapper(args){ ...@@ -11,7 +11,7 @@ function MenuWrapper(args){
var latticeMenu = new LatticeMenuView({model:args.lattice}); var latticeMenu = new LatticeMenuView({model:args.lattice});
var importMenu = new ImportMenuView(); var importMenu = new ImportMenuView();
var sketchMenu = new SketchMenuView(); var sketchMenu = new SketchMenuView();
var partMenu = new PartMenuView(); var partMenu = new PartMenuView({model:args.lattice});
var scriptMenu = new ScriptMenuView(); var scriptMenu = new ScriptMenuView();
init(); init();
......
...@@ -12,14 +12,15 @@ PartMenuView = Backbone.View.extend({ ...@@ -12,14 +12,15 @@ PartMenuView = Backbone.View.extend({
initialize: function(){ initialize: function(){
_.bindAll(this, "render"); _.bindAll(this, "render");
this.listenTo(this.model, "change:partType", this.render);
}, },
render: function(){ render: function(){
this.$el.html(this.template()); this.$el.html(this.template(this.model.attributes));
}, },
template: _.template('\ template: _.template('\
Part Type: <br/>\ Part Type: &nbsp;&nbsp;<%= partType %><br/>\
') ')
}); });
\ No newline at end of file
...@@ -11,7 +11,8 @@ Lattice = Backbone.Model.extend({ ...@@ -11,7 +11,8 @@ Lattice = Backbone.Model.extend({
connectionType: "face", connectionType: "face",
nodes: [], nodes: [],
cells: [], cells: [],
numCells: 0 numCells: 0,
partType: "triangle"
}, },
//pass in fillGeometry //pass in fillGeometry
......
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