2 Commits
Author SHA1 Message Date
kathleen a195a8a483 Merge pull request 'Valley map: every choice point is a clickable dot' (#32) from site/choice-dots into main
CI / test (push) Successful in 3m0s
2026-11-19 04:01:52 +00:00
ekcSchianoandClaude Opus 5.5 c1d3840d94 Valley map: every choice point is a clickable dot
CI / test (pull_request) Successful in 2m9s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
2026-11-18 22:56:29 -05:00
+16
View File
@@ -420,6 +420,22 @@
hit.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); go(); } }); hit.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); go(); } });
} }
}); });
// every other choice point (the bully fight's endings, the wounded cadet's, the forks, who you enter with) is a
// small dot you can click too; its name shows on hover, and in full once it is picked or its moment is open
if (!st.colour && st.policy) {
Object.keys(POINTS).forEach((id) => {
const P = L[id];
if (!P || P.kind === "dragon" || ids.has(id)) return;
const name = LANDMARK_NAME[id] || P.name || id;
const hit = el("g", { class: "ex-place ex-minor", tabindex: 0, role: "button", "aria-label": `${name}: show the best way from here to every dragon` }, g);
el("circle", { cx: P.x, cy: P.y, r: 10, fill: "transparent" }, hit);
el("circle", { cx: P.x, cy: P.y, r: 3.6, fill: PAPER.halo, stroke: PAPER.ink, "stroke-width": 1.6, "stroke-opacity": 0.85 }, hit);
el("title", {}, hit).textContent = `${name}${P.desc ? `: ${P.desc}` : ""} Click for the best way from here to every dragon.`;
const go = () => { st.point = id; st.info = null; writeHash(); render(); };
hit.addEventListener("click", go);
hit.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); go(); } });
});
}
const gt = el("text", { x: GATE.x, y: GATE.y + 14, "text-anchor": "middle", "font-size": 11, "letter-spacing": "0.16em", fill: PAPER.ink, "font-family": "var(--font-label)", "paint-order": "stroke", stroke: PAPER.halo, "stroke-width": 3 }, g); const gt = el("text", { x: GATE.x, y: GATE.y + 14, "text-anchor": "middle", "font-size": 11, "letter-spacing": "0.16em", fill: PAPER.ink, "font-family": "var(--font-label)", "paint-order": "stroke", stroke: PAPER.halo, "stroke-width": 3 }, g);
gt.textContent = "ENTER THE VALLEY"; gt.textContent = "ENTER THE VALLEY";
if (!st.colour && st.policy) { if (!st.colour && st.policy) {