Added 'Status LEDs' to the 'Add Key' dropdown.

pull/120/head
Ian Prest 9 years ago
parent 548ad31590
commit df8378d52d

@ -134,7 +134,7 @@ Nav Bar / Header
<li><a ng-click="addKeys(10)">Add 10 Keys</a></li>
<li><a ng-click="addKeys(25)">Add 25 Keys</a></li>
<li class="divider" ng-class="{hidden: !specialKeys}"></li>
<li ng-repeat="(k,v) in specialKeys"><a ng-click="addKey(v)">Add '{{k}}' Key</a></li>
<li ng-repeat="(k,v) in specialKeys"><a ng-click="addKey(v)">{{k}}</a></li>
</ul>
</div>

36
kb.js

@ -908,7 +908,7 @@
if(xpos >= 23) { xpos = 0; ypos++; }
} else {
$scope.keys().forEach(function(key) {
if(key.rotation_angle == $scope.multi.rotation_angle && key.rotation_x == $scope.multi.rotation_x && key.rotation_y == $scope.multi.rotation_y) {
if(!$scope.selectedKeys.length || (key.rotation_angle == $scope.multi.rotation_angle && key.rotation_x == $scope.multi.rotation_x && key.rotation_y == $scope.multi.rotation_y)) {
ypos = Math.max(ypos,key.y);
}
});
@ -921,20 +921,28 @@
var newKey = null;
transaction("add", function() {
var pos = whereToAddNewKeys(nextline);
newKey = $serial.defaultKeyProps();
if($scope.selectedKeys.length>0) {
newKey.color = $scope.multi.color;
newKey.textColor = $scope.multi.textColor;
newKey.profile = $scope.multi.profile;
newKey.rotation_angle = $scope.multi.rotation_angle;
newKey.rotation_x = $scope.multi.rotation_x;
newKey.rotation_y = $scope.multi.rotation_y;
var _addKey = function(proto) {
newKey = $serial.defaultKeyProps();
if($scope.selectedKeys.length>0) {
newKey.color = $scope.multi.color;
newKey.textColor = $scope.multi.textColor;
newKey.profile = $scope.multi.profile;
newKey.rotation_angle = $scope.multi.rotation_angle;
newKey.rotation_x = $scope.multi.rotation_x;
newKey.rotation_y = $scope.multi.rotation_y;
}
$.extend(newKey, proto);
newKey.x += pos.x;
newKey.y += pos.y;
renderKey(newKey);
pos.x += Math.max(newKey.width, newKey.width2);
$scope.keys().push(newKey);
}
if(proto instanceof Array) {
proto.forEach(_addKey);
} else {
_addKey(proto);
}
$.extend(newKey, proto);
newKey.x += pos.x;
newKey.y += pos.y;
renderKey(newKey);
$scope.keys().push(newKey);
});
selectKey(newKey,{});
$scope.calcKbHeight();

@ -1,6 +1,11 @@
{
"ISO Enter" : { "width":1.25, "width2":1.5, "height":2, "height2":1, "x":0.25, "x2":-0.25, "y2":0 },
"Big-Ass Enter" : { "width":1.5, "width2":2.25, "height":2, "height2":1, "x":0.75, "x2":-0.75, "y2":1 },
"Stepped Caps-Lock" : { "width":1.25, "width2":1.75, "stepped":true },
"Center-stepped" : { "width": 1, "width2":1.5, "x":0.25, "x2":-0.25, "stepped":true }
"Add 'ISO Enter' Key" : { "width":1.25, "width2":1.5, "height":2, "height2":1, "x":0.25, "x2":-0.25, "y2":0 },
"Add 'Big-Ass Enter' Key" : { "width":1.5, "width2":2.25, "height":2, "height2":1, "x":0.75, "x2":-0.75, "y2":1 },
"Add 'Stepped Caps-Lock' Key" : { "width":1.25, "width2":1.75, "stepped":true },
"Add 'Center-stepped' Key" : { "width": 1, "width2":1.5, "x":0.25, "x2":-0.25, "stepped":true },
"Add 'Status LEDs'" : [
{ "textColor": [null, "#ff0000", null, null, null, null, null, "#000000"], "textSize": [0,3,0,0,0,0,0,1], "labels": [null, "<i class='fa fa-circle'></i>", null, null, null, null, null, "NUM LOCK"], "decal": true },
{ "textColor": [null, "#800000", null, null, null, null, null, "#000000"], "textSize": [0,3,0,0,0,0,0,1], "labels": [null, "<i class='fa fa-circle'></i>", null, null, null, null, null, "CAPS LOCK"], "decal": true },
{ "textColor": [null, "#800000", null, null, null, null, null, "#000000"], "textSize": [0,3,0,0,0,0,0,1], "labels": [null, "<i class='fa fa-circle'></i>", null, null, null, null, null, "SCROLL LOCK"], "decal": true }
]
}

Loading…
Cancel
Save