diff --git a/css/main.css b/css/main.css index 921499c1a2d9f939dbc8a0cab326d3b663a0eaf6..19eaa471ee52868ef9f0c283332d1a39f66b5db2 100644 --- a/css/main.css +++ b/css/main.css @@ -183,7 +183,7 @@ hr { margin: 20px 0; } -input.intInput, number.floatInput{ +input.intInput, input.floatInput{ width:22%; display: inline; padding: 8px 10px; diff --git a/js/menus/LatticeMenuView.js b/js/menus/LatticeMenuView.js index 793f3b56aabfec24f0aa25298e066ae2b515c6be..ecb7c1bdd8f37923fce375803157e4fc30b53d6d 100644 --- a/js/menus/LatticeMenuView.js +++ b/js/menus/LatticeMenuView.js @@ -9,6 +9,7 @@ LatticeMenuView = Backbone.View.extend({ events: { "click #latticeMenuClearCells": "_clearCells", + "change #latticeScale": "_changeScale", "slide #latticeMenuScaleSlider": "_sliderDidSlide", "slideStop #latticeMenuScaleSlider": "_changeScaleSlider" @@ -31,10 +32,6 @@ LatticeMenuView = Backbone.View.extend({ globals.lattice.trigger("change:"+property); }, - _updateGikLength: function(e){ - - }, - _clearCells: function(e){ e.preventDefault(); globals.lattice.clearCells(); @@ -61,7 +58,7 @@ LatticeMenuView = Backbone.View.extend({ render: function(){ if (this.model.changedAttributes()["currentNav"]) 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({ formatter: function(value) { @@ -115,7 +112,7 @@ LatticeMenuView = Backbone.View.extend({ </div><br/><br/>\ <% } %>\ <br/>\ - Scale: <input id="latticeScale" value="<%= scale %>" placeholder="enter scale" class="form-control numberInput" type="text"><br/>\ + Scale: <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 %>"/>\ <br/>\ Units: \