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

lattice menu fixed

parent 405ce461
Branches
No related tags found
No related merge requests found
...@@ -183,7 +183,7 @@ hr { ...@@ -183,7 +183,7 @@ hr {
margin: 20px 0; margin: 20px 0;
} }
input.intInput, number.floatInput{ input.intInput, input.floatInput{
width:22%; width:22%;
display: inline; display: inline;
padding: 8px 10px; padding: 8px 10px;
......
...@@ -9,6 +9,7 @@ LatticeMenuView = Backbone.View.extend({ ...@@ -9,6 +9,7 @@ LatticeMenuView = Backbone.View.extend({
events: { events: {
"click #latticeMenuClearCells": "_clearCells", "click #latticeMenuClearCells": "_clearCells",
"change #latticeScale": "_changeScale", "change #latticeScale": "_changeScale",
"slide #latticeMenuScaleSlider": "_sliderDidSlide", "slide #latticeMenuScaleSlider": "_sliderDidSlide",
"slideStop #latticeMenuScaleSlider": "_changeScaleSlider" "slideStop #latticeMenuScaleSlider": "_changeScaleSlider"
...@@ -31,10 +32,6 @@ LatticeMenuView = Backbone.View.extend({ ...@@ -31,10 +32,6 @@ LatticeMenuView = Backbone.View.extend({
globals.lattice.trigger("change:"+property); globals.lattice.trigger("change:"+property);
}, },
_updateGikLength: function(e){
},
_clearCells: function(e){ _clearCells: function(e){
e.preventDefault(); e.preventDefault();
globals.lattice.clearCells(); globals.lattice.clearCells();
...@@ -61,7 +58,7 @@ LatticeMenuView = Backbone.View.extend({ ...@@ -61,7 +58,7 @@ LatticeMenuView = Backbone.View.extend({
render: function(){ render: function(){
if (this.model.changedAttributes()["currentNav"]) return; if (this.model.changedAttributes()["currentNav"]) return;
if (this.model.get("currentTab") != "lattice") return; if (this.model.get("currentTab") != "lattice") return;
this.$el.html(this.template(_.extend(this.model.toJSON(), globals.lattice.toJSON(), globals.plist))); this.$el.html(this.template(_.extend(globals.lattice.toJSON(), globals.plist)));
$('#latticeMenuScaleSlider').slider({ $('#latticeMenuScaleSlider').slider({
formatter: function(value) { formatter: function(value) {
...@@ -115,7 +112,7 @@ LatticeMenuView = Backbone.View.extend({ ...@@ -115,7 +112,7 @@ LatticeMenuView = Backbone.View.extend({
</div><br/><br/>\ </div><br/><br/>\
<% } %>\ <% } %>\
<br/>\ <br/>\
Scale:&nbsp;&nbsp;<input id="latticeScale" value="<%= scale %>" placeholder="enter scale" class="form-control numberInput" type="text"><br/>\ Scale:&nbsp;&nbsp;<input data-property="scale" value="<%= scale %>" placeholder="Scale" class="form-control floatInput lattice" type="text"><br/>\
<input id="latticeMenuScaleSlider" data-slider-id="ex1Slider" type="text" data-slider-min="1" data-slider-max="100" data-slider-step="0.1" data-slider-value="<%= scale %>"/>\ <input id="latticeMenuScaleSlider" data-slider-id="ex1Slider" type="text" data-slider-min="1" data-slider-max="100" data-slider-step="0.1" data-slider-value="<%= scale %>"/>\
<br/>\ <br/>\
Units: &nbsp;&nbsp;\ Units: &nbsp;&nbsp;\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment