Skip to content

Commit

Permalink
#30. tweaking display table. bug fix. optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
tarling committed Nov 16, 2015
1 parent f959080 commit 3de69dc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/css/wedo.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#pane-wedo .table-wrapper .table col:nth-of-type(1) {
width: 10%; }
#pane-wedo .table-wrapper .table col:nth-of-type(2) {
width: 70%; }
width: 50%; }
#pane-wedo .table-wrapper .table col:nth-of-type(3) {
width: 20%; }
width: 40%; }
#pane-wedo .table-wrapper .table th {
text-align: center; }
#pane-wedo .table-wrapper .table .slot-type {
padding-left: 20px !important; }
#pane-wedo .table-wrapper .table .slot-value {
text-align: center; }
text-align: right; }

#pane-wedo .req {
display: none; }
2 changes: 1 addition & 1 deletion app/js/devices/wedo/blockly/generators/javascript/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ define(["../javascript"],function(generators){
var tilt_value = block.getFieldValue('value');
var statements_trueblock = generators.statementToCode(block, 'trueblock');
var statements_falseblock = generators.statementToCode(block, 'falseblock');
var code = 'if (' + text_sensor + ' ' + text_value + ') {\n';
var code = 'if (' + text_sensor + ' ' + tilt_value + ') {\n';
code += statements_trueblock;
code += '} else {\n';
code += statements_falseblock;
Expand Down
8 changes: 4 additions & 4 deletions app/js/devices/wedo/wedo-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ define([
}

var self = {};

var TILT_STATES = ["none","down","this way","up","that way"];

self.updateConnection = function(count) {
if (count > 0)
{
Expand Down Expand Up @@ -117,12 +118,11 @@ define([
else
value = lang.ui.get("DEVICE_OFF");
}

if (isTilt(type)) {
var TILT_STATES = ["none","down","this way","up","that way"];
value = TILT_STATES[value];
}

var s = isSensor(type);
type = type.toLowerCase();
if (s) type += " " + lang.ui.get("DEVICE_SENSOR");
Expand Down
6 changes: 3 additions & 3 deletions src/sass/wedo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
width: 10%;
}
&:nth-of-type(2) {
width: 70%;
width: 50%;
}
&:nth-of-type(3) {
width: 20%;
width: 40%;
}
}

Expand All @@ -26,7 +26,7 @@
padding-left: 20px !important;
}
.slot-value {
text-align: center;
text-align: right;
}
}
}
Expand Down

0 comments on commit 3de69dc

Please sign in to comment.