From 842a81dd15c869f76569c55d23bbe492ae59a661 Mon Sep 17 00:00:00 2001 From: lorp Date: Tue, 6 Feb 2024 01:37:07 +0000 Subject: [PATCH] Removed x-axis-select, y-axis-select, and minor refactor --- src/fencer.html | 6 ++++-- src/fencer.js | 13 ++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/fencer.html b/src/fencer.html index a7bd6f0..e0b7ca7 100644 --- a/src/fencer.html +++ b/src/fencer.html @@ -213,10 +213,12 @@

Mappings visual -
+ + +
diff --git a/src/fencer.js b/src/fencer.js index 7b41ff7..5dd44ce 100644 --- a/src/fencer.js +++ b/src/fencer.js @@ -224,6 +224,7 @@ function onDropFont (e) { } } + /* // init x-axis-select and y-axis-select select elements const xAxisSelectEl = document.querySelector("#x-axis-select"); const yAxisSelectEl = document.querySelector("#y-axis-select"); @@ -237,6 +238,7 @@ function onDropFont (e) { xAxisSelectEl.append(xOption); yAxisSelectEl.append(yOption); }); + */ // // init global axis values // GLOBAL.axisValues = []; @@ -247,6 +249,7 @@ function onDropFont (e) { // draw mappings SVG updateMappingsSVG(); + refreshResults(); }); } @@ -500,25 +503,17 @@ function refreshResults() { }); } else { - //const thisRenderVariationSettings = []; const axisValues = getCurrentAxisValues(); const axisEls = renderItemEl.querySelectorAll(".axis"); - - // get the locked/unlocked status of each axis axisEls.forEach((axisEl, a) => { const axis = GLOBAL.font.fvar.axes[a]; const valueEl = axisEl.querySelector(".value"); if (!axisEl.querySelector(".lock").classList.contains("locked")) { - valueEl.value = axisValues[a]; + valueEl.value = axisValues[a]; // if unlocked, update it to the current axis value } - //thisRenderVariationSettings.push(`"${axis.axisTag}" ${valueEl.value}`); fvsEntries.push(`"${axis.axisTag}" ${valueEl.value}`); - //}); }); - - //renderEl.style.fontVariationSettings = thisRenderVariationSettings.join(); } - renderEl.style.fontVariationSettings = fvsEntries.join(); }); }