Skip to content

Commit

Permalink
Relax requirement for providing matrix pair for decal keys
Browse files Browse the repository at this point in the history
  • Loading branch information
olivia committed Jan 7, 2020
1 parent 0433627 commit c772de4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}

Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./validated-types/keyboard-definition-v2.validator"));
var via_definition_v2_validator_1 = require("./validated-types/via-definition-v2.validator");
Expand Down
3 changes: 2 additions & 1 deletion dist/kle-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ function kleLayoutToVIALayout(kle) {
else if (typeof n === 'string') {
var colorCountKey = c + ":" + t;
var labels = n.split('\n');
var _d = extractPair(labels[0]), row = _d[0], col = _d[1];
// Ignore row,col + requirement if key is a decal key
var _d = d ? [0, 0] : extractPair(labels[0]), row = _d[0], col = _d[1];
var groupLabel = labels[3] || '-1,0';
var _e = extractPair(groupLabel), group = _e[0], option = _e[1];
var newColorCount = __assign(__assign({}, colorCount), (_b = {}, _b[colorCountKey] = colorCount[colorCountKey] === undefined
Expand Down
3 changes: 2 additions & 1 deletion src/kle-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ export function kleLayoutToVIALayout(kle: KLELayout): VIALayout {
} else if (typeof n === 'string') {
const colorCountKey = `${c}:${t}`;
const labels = n.split('\n');
const [row, col] = extractPair(labels[0]);
// Ignore row,col + requirement if key is a decal key
const [row, col] = d ? [0, 0] : extractPair(labels[0]);
const groupLabel = labels[3] || '-1,0';
const [group, option] = extractPair(groupLabel);
const newColorCount = {
Expand Down

0 comments on commit c772de4

Please sign in to comment.