mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Draw the loop's strength picker as a stepped grid and release 3.0.5
AI Assisted
This commit is contained in:
1 parent
4f172c63d3
commit
f5369df090
15 files changed
+97
-14
No files matched your search
@@ -2262,6 +2262,10 @@
|
||||
is on) goes one step up (Match my session stays on the launch model),
|
||||
and the phase's helpers follow.
|
||||
</p>
|
||||
<p>
|
||||
Click a dot in a phase's row to pick (the arrow keys move along a row);
|
||||
a line steps through each row's pick so the choices read at a glance.
|
||||
</p>
|
||||
<h4>What is locked while it runs</h4>
|
||||
<p>
|
||||
Answers, sign-offs, launches, Workspace, Helpers and
|
||||
|
||||
@@ -378,6 +378,8 @@ function strengthBars(level) {
|
||||
const SVG_NS = "http://www.w3.org/2000/svg";
|
||||
let lineGrid = null;
|
||||
let lineWatching = false;
|
||||
// The grid can change width with no window resize (Preferences' page width): watch the grid itself too.
|
||||
const lineObserver = typeof ResizeObserver === "function" ? new ResizeObserver(() => redrawLine()) : null;
|
||||
|
||||
function svgPart(name, attrs) {
|
||||
const part = document.createElementNS(SVG_NS, name);
|
||||
@@ -432,14 +434,16 @@ function redrawLine() {
|
||||
function stopWatchingLine() {
|
||||
lineGrid = null;
|
||||
if (lineWatching) window.removeEventListener("resize", redrawLine);
|
||||
if (lineObserver) lineObserver.disconnect();
|
||||
lineWatching = false;
|
||||
}
|
||||
|
||||
/** Draw once layout exists, and again on resize and when fonts load; stop once the grid is gone. */
|
||||
/** Draw once layout exists, and again on resize (the window's or the grid's) and when fonts load; stop once the grid is gone. */
|
||||
function watchStrengthLine(grid) {
|
||||
lineGrid = grid;
|
||||
if (!lineWatching) window.addEventListener("resize", redrawLine);
|
||||
lineWatching = true;
|
||||
if (lineObserver) lineObserver.observe(grid);
|
||||
requestAnimationFrame(redrawLine);
|
||||
if (document.fonts && document.fonts.ready) document.fonts.ready.then(redrawLine);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user