diff --git a/css/main.css b/css/main.css index 81c6b8ef99c0647a7677e7e80563dac23826f690..a3ec05f94b9c527bde0ddde30ce533cf9261b177 100644 --- a/css/main.css +++ b/css/main.css @@ -400,10 +400,6 @@ label { padding-bottom: 20px; } -label.colorSwatches>span.icons{ - margin: 5px 0; -} - #navViewMenu .dropdown-menu span{ margin-right:10px; } @@ -428,3 +424,22 @@ label.colorSwatches>span.icons{ .red { color:red; } + + +.checkbox .icons, .radio .icons, .checkbox input[type="checkbox"].custom-checkbox, .radio input[type="checkbox"].custom-checkbox, .checkbox input[type="radio"].custom-radio, .radio input[type="radio"].custom-radio { + margin-top: -10px; + top:50%; +} + +.voltageInput, .voltageInput:focus{ + border-color: #f4d313; +} + +.currentInput, .currentInput:focus{ + border-color: #58d68d; +} + +.voltageInput, .currentInput { + margin-left: 15px; + width: 30%!important; +} \ No newline at end of file diff --git a/js/lattice/LatticeEsim.js b/js/lattice/LatticeEsim.js index ac8f21ff2336828064d3fa7dbf37d4efc4f323c9..dcabf95bf551fe45296d3602ea6d1a9019c2f679 100644 --- a/js/lattice/LatticeEsim.js +++ b/js/lattice/LatticeEsim.js @@ -10,7 +10,7 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell' _eSimTabChanged: function(){ var currentTab = appState.get("currentTab"); - if (currentTab == "eSetup") this._showConductors(); + if (currentTab == "eSetup" || currentTab == "eStatic") this._showConductors(); else this.setOpaque(); }, @@ -46,7 +46,9 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell' var groups = []; this._loopCells(this.cells, function(cell){ if (!cell) return; - if (groups.indexOf(cell.getConductorGroupNum()) < 0 && cell.isConductive()) { + if (_.filter(groups, function(group){ + return group.id == cell.getConductorGroupNum(); + }).length == 0 && cell.isConductive()) { groups.push({id:cell.getConductorGroupNum(), current: null, voltage: null}); } }); diff --git a/js/menus/EStaticMenuView.js b/js/menus/EStaticMenuView.js index 328d3616878fc710418f5dd34fab3b08f36d5bb0..46b727704ea73b3a88a56c1a75a4933385c93aba 100644 --- a/js/menus/EStaticMenuView.js +++ b/js/menus/EStaticMenuView.js @@ -21,7 +21,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'text!eStaticMenuTemplate }, _makeTemplateJSON: function(){ - console.log(eSim.get("conductorGroups")); return _.extend(this.model.toJSON(), eSim.toJSON()); }, diff --git a/js/menus/templates/EStaticMenuView.html b/js/menus/templates/EStaticMenuView.html index 08524b07595c4cc93fc586844e09a8a50f988e5c..0dda46b2587910037a8c424677a44d2d66404eb7 100644 --- a/js/menus/templates/EStaticMenuView.html +++ b/js/menus/templates/EStaticMenuView.html @@ -7,12 +7,12 @@ <label class="radio"> <input type="radio" <% if (groupData.id == visibleConductorGroup){ %>checked<% } %> name="visibleConductorGroup" value="<%= groupData.id %>" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span> Group <%= index + 1 %> - <input data-property="voltage" value="<%= groupData.voltage %>" placeholder="Voltage" class="form-control floatInput eSim" type="text"> - <input data-property="current" value="<%= groupData.current %>" placeholder="Current" class="form-control floatInput eSim" type="text"> + <input data-property="voltage" value="<%= groupData.voltage %>" placeholder="Voltage" class="form-control floatInput eSim voltageInput" type="text"> + <input data-property="current" value="<%= groupData.current %>" placeholder="Current" class="form-control floatInput eSim currentInput" type="text"> </label> <% }); %> <% } %> Capacitance:<br/> -inductance<br/> \ No newline at end of file +Inductance:<br/> \ No newline at end of file