@lyric_dev/data-loom 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/app.js +9 -5
- package/public/style.css +3 -3
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -29,9 +29,9 @@ let conflictedNames = new Set();
|
|
|
29
29
|
let doneCollapsed = true;
|
|
30
30
|
const liveOverride = new Map(); // server name -> transient liveness (e.g. "checking")
|
|
31
31
|
|
|
32
|
-
// ── roadmap graph geometry (fixed
|
|
32
|
+
// ── roadmap graph geometry (fixed left/right margin + fixed per-phase pitch) ──
|
|
33
33
|
const G_MX = 150,
|
|
34
|
-
|
|
34
|
+
PHASE_SPAN = 260, // horizontal pitch between phase columns (234px frame + gutter)
|
|
35
35
|
N_HALF = 105,
|
|
36
36
|
N_TOP = 58,
|
|
37
37
|
V_SPACE = 170;
|
|
@@ -204,8 +204,11 @@ function renderBoard() {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
const phaseNums = [...new Set(open.map((c) => c.phase))].sort((a, b) => a - b);
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
// Fixed per-phase pitch → the canvas grows wider as phases are added instead of
|
|
208
|
+
// squeezing columns into a constant width. Wide plans then scroll horizontally
|
|
209
|
+
// (see .board-wrap) rather than overlapping.
|
|
210
|
+
const canvasW = 2 * G_MX + Math.max(phaseNums.length - 1, 0) * PHASE_SPAN;
|
|
211
|
+
const gx = (p) => G_MX + phaseNums.indexOf(p) * PHASE_SPAN;
|
|
209
212
|
|
|
210
213
|
// Grow the canvas vertically so the tallest phase always fits (real projects
|
|
211
214
|
// can stack many cards in one phase). CARD_BAND leaves headroom for the
|
|
@@ -214,8 +217,9 @@ function renderBoard() {
|
|
|
214
217
|
const maxN = Math.max(1, ...phaseNums.map((p) => open.filter((c) => c.phase === p).length));
|
|
215
218
|
const canvasH = Math.max(600, (maxN - 1) * V_SPACE + CARD_BAND);
|
|
216
219
|
const cy = canvasH / 2;
|
|
220
|
+
board.style.width = canvasW + "px";
|
|
217
221
|
board.style.height = canvasH + "px";
|
|
218
|
-
edgesSvg.setAttribute("viewBox", `0 0 ${
|
|
222
|
+
edgesSvg.setAttribute("viewBox", `0 0 ${canvasW} ${canvasH}`);
|
|
219
223
|
|
|
220
224
|
// Phase-band frames (behind everything), sized to the canvas.
|
|
221
225
|
phaseNums.forEach((p, i) => {
|
package/public/style.css
CHANGED
|
@@ -293,12 +293,12 @@ main {
|
|
|
293
293
|
|
|
294
294
|
.board-wrap {
|
|
295
295
|
position: relative;
|
|
296
|
+
overflow-x: auto; /* wide roadmaps (many phases) pan horizontally; banners above stay fixed */
|
|
296
297
|
}
|
|
297
298
|
.board {
|
|
298
299
|
position: relative;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
margin: 0 auto;
|
|
300
|
+
height: 600px; /* width + height are set from JS per phase/card count */
|
|
301
|
+
margin: 0 auto; /* centers when it fits; collapses to 0 when it overflows and scrolls */
|
|
302
302
|
}
|
|
303
303
|
.edges {
|
|
304
304
|
position: absolute;
|