← Commit history

amfm-receiver-molecule: readme.html: chart readouts no longer overlap their titles on narrow screens

noah ·25bb427e12 · ·parent 46622bf
3 files changed +4−3
package.json+1−1
@@ -1,7 +1,7 @@ {  "slug": "amfm-receiver-molecule",  "title": "AM/FM Receiver Molecule",- "version": "0.1.4",+ "version": "0.1.5",  "type": "hardware",  "kind": "molecule",  "description": "USB-powered AM/FM receiver on an Adom Molecule: discrete BJT and op-amp superhet (10.7 MHz and 455 kHz IFs), STM32G0B1 tuning, self-calibration and USB audio over one USB-C cable. 96 x 96 mm pin grid, 4 layers, KiCad 10.",
page.json+1−1
@@ -5,7 +5,7 @@  "slug": "amfm-receiver-molecule",  "title": "AM/FM Receiver Molecule",  "brief": "USB-powered AM/FM receiver on an Adom Molecule: discrete BJT and op-amp superhet (10.7 MHz and 455 kHz IFs), STM32G0B1 tuning, self-calibration and USB audio over one USB-C cable. 96 x 96 mm pin grid, 4 layers, KiCad 10.",- "version": "0.1.4",+ "version": "0.1.5",  "license": "CC-BY-SA-4.0",  "tags": [   "molecule",
readme.html+2−1
@@ -4497,7 +4497,8 @@ var SCOPE = (function () {       const y0 = top + k * (ph + gap) + (big ? 18 : 14), y1 = y0 + ph;       const Y = (v) => y1 - (Math.max(p.y[0] - (p.y[1] - p.y[0]) * 0.08, Math.min(p.y[1] + (p.y[1] - p.y[0]) * 0.08, v)) - p.y[0]) / (p.y[1] - p.y[0]) * ph;       rows.push({ p, Y, y0, y1 });-      o.push('<text class="pl" x="' + L + '" y="' + (y0 - (big ? 10 : 7)) + '">' + esc(fitText(p.title, R - L, big)) + '</text>');+      const room = R - L - (p.label && big ? p.label.length * 7.9 + 18 : 0);     // leave room for the readout on the same line+      o.push('<text class="pl" x="' + L + '" y="' + (y0 - (big ? 10 : 7)) + '">' + esc(fitText(p.title, room, big)) + '</text>');       if (!p.noTicks) {         const st = niceStep(p.y[1] - p.y[0], big ? 4 : 2);         for (let j = Math.ceil(p.y[0] / st - 1e-9), v = j * st; v <= p.y[1] + st * 1e-6; j++, v = j * st) {