From d79d1511f79b137b1bca442fc4bf58c6f075eaaa Mon Sep 17 00:00:00 2001 From: Ian Prest Date: Wed, 19 Sep 2018 19:37:49 -0700 Subject: [PATCH] added FLAT profile --- kb.css | 8 ++++++++ kb.html | 2 +- render.js | 10 ++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/kb.css b/kb.css index 8761c29..23fff59 100644 --- a/kb.css +++ b/kb.css @@ -158,6 +158,14 @@ for i in (1..9) { } .DSA.HOMING .keylabels, .SA.HOMING .keylabels { background-image: none; } +.FLAT .keytop { + display: none; +} +.CHICKLET .keylabel9, .CHICKLET .keylabel10, .CHICKLET .keylabel11, +.FLAT .keylabel9, .FLAT .keylabel10, .FLAT .keylabel11 { + display: none; +} + /* color swatches */ #swatches, #glyphs { list-style-type: none; margin: 0px; padding: 0px; } .swatch, .glyph { diff --git a/kb.html b/kb.html index 4c20694..8081eb9 100644 --- a/kb.html +++ b/kb.html @@ -470,7 +470,7 @@ Nav Bar / Header data-hint="Specify the profile and (optionally) the row-number of the selected keys, e.g., 'DCS R1', 'DSA', 'DSA SPACE', etc. Supported profiles: -  • SA, DSA, DCS, OEM, CHICKLET +  • SA, DSA, DCS, OEM, CHICKLET, FLAT Supported rows:  • R1, R2, R3, R4, R5, SPACE"> diff --git a/render.js b/render.js index 0d62e62..1b8b18c 100644 --- a/render.js +++ b/render.js @@ -13,24 +13,26 @@ var $renderKey = (typeof(exports) !== 'undefined') ? exports : {}; px : { unit : 54, strokeWidth: 1, - "" : { profile: "" , keySpacing: 0, bevelMargin: 6, bevelOffsetTop: 3, bevelOffsetBottom: 3, padding: 3, roundOuter: 5, roundInner: 3 }, + "" : { profile: "" , keySpacing: 0, bevelMargin: 6, bevelOffsetTop: 3, bevelOffsetBottom: 3, padding: 3, roundOuter: 5, roundInner: 3 }, "DCS" : { profile: "DCS", keySpacing: 0, bevelMargin: 6, bevelOffsetTop: 3, bevelOffsetBottom: 3, padding: 3, roundOuter: 5, roundInner: 3 }, "DSA" : { profile: "DSA", keySpacing: 0, bevelMargin: 6, bevelOffsetTop: 0, bevelOffsetBottom: 0, padding: 3, roundOuter: 5, roundInner: 8 }, "SA" : { profile: "SA", keySpacing: 0, bevelMargin: 6, bevelOffsetTop: 2, bevelOffsetBottom: 2, padding: 3, roundOuter: 5, roundInner: 5 }, "CHICKLET" : { profile: "CHICKLET", keySpacing: 3, bevelMargin: 1, bevelOffsetTop: 0, bevelOffsetBottom: 2, padding: 4, roundOuter: 4, roundInner: 4 }, + "FLAT" : { profile: "FLAT" , keySpacing: 1, bevelMargin: 1, bevelOffsetTop: 0, bevelOffsetBottom: 0, padding: 4, roundOuter: 5, roundInner: 3 }, }, mm : { unit: 19.05, strokeWidth: 0.20, - "" : { profile: "" , keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, + "" : { profile: "" , keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, "DCS" : { profile: "DCS", keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, "DSA" : { profile: "DSA", keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, "SA" : { profile: "SA", keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, "CHICKLET" : { profile: "CHICKLET", keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, + "FLAT" : { profile: "FLAT" , keySpacing: 0.4445, bevelMargin: 3.1115, padding: 0, roundOuter: 1.0, roundInner: 2.0 }, } }; ["px","mm"].forEach(function(unit) { - ["","DCS","DSA", "SA", "CHICKLET"].forEach(function(profile) { + ["","DCS","DSA","SA","CHICKLET","FLAT"].forEach(function(profile) { unitSizes[unit][profile].unit = unitSizes[unit].unit; unitSizes[unit][profile].strokeWidth = unitSizes[unit].strokeWidth; }); @@ -45,7 +47,7 @@ var $renderKey = (typeof(exports) !== 'undefined') ? exports : {}; } function getProfile(key) { - return (/\b(SA|DSA|DCS|OEM|CHICKLET)\b/.exec(key.profile) || [""])[0]; + return (/\b(SA|DSA|DCS|OEM|CHICKLET|FLAT)\b/.exec(key.profile) || [""])[0]; } function getRenderParms(key, sizes) {