901 lines
101 KiB
HTML
901 lines
101 KiB
HTML
<!doctype html>
|
||
<html lang="fr">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Faunosteo V1-2.6 U2 manipulation des annotations (proposition)</title>
|
||
<!--
|
||
V1-2.6 U2 boards (owner brief 2026-11-17 « préparer U2 », orientation 2026-11-14 BDR-117; contract
|
||
.claude/tasks/contracts/2026-11-17-u2-design-boards.md): static functional mockups, never shipped, NOT validated.
|
||
Styles, icons, shell and drawing helpers are copied from docs/design/v1-2-6-r0/maquettes.html (itself copied from the
|
||
validated v1-2-6 boards); the Annotations tab follows the U1 build as audited 2026-11-17 (EditableAnnotations,
|
||
OverviewPanel, ToolColumn, KeyboardAdd, Dialog). Every annotation, name, category, laterality, findings zone,
|
||
vertebral region, review status, coordinate and point size comes from data.js, generated by gen-data.cjs from the
|
||
equine draft document.json. Staging text is listed in REVUE.md. Rendered to PNG by ../v1-2-6/render.cjs.
|
||
-->
|
||
<style>
|
||
:root {
|
||
--color-bg: #fbf9f5; --color-surface: #ffffff; --color-surface-strong: #f4efe6;
|
||
--color-ink: #1f1b16; --color-ink-muted: #6b6359; --color-border: #e7e0d2;
|
||
--color-accent: #b85a3f; --color-accent-strong: #9c4831;
|
||
--color-danger: #c0392b; --color-danger-strong: #962c21;
|
||
--severity-mild: #6b8e6b; --severity-moderate: #b88a3f; --severity-severe: #c0392b;
|
||
--font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
||
--font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
|
||
}
|
||
* { box-sizing: border-box; }
|
||
body { margin: 0; background: #ece6da; font-family: var(--font-sans); color: var(--color-ink); -webkit-font-smoothing: antialiased; }
|
||
.sheet-title { font: 600 15px var(--font-sans); margin: 0 0 10px; }
|
||
.row { display: flex; gap: 28px; align-items: flex-start; padding: 24px 28px; flex-wrap: wrap; }
|
||
[data-board] { background: #ece6da; padding: 16px; }
|
||
.frame { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(31,27,22,.06); position: relative; }
|
||
.desk { width: 1280px; height: 800px; display: flex; }
|
||
.tab-frame { width: 1180px; height: 820px; display: flex; flex-direction: column; border-radius: 22px; border: 10px solid #2a2520; }
|
||
.phone { width: 375px; height: 780px; display: flex; flex-direction: column; border-radius: 28px; border: 8px solid #2a2520; position: relative; }
|
||
.side { width: 216px; flex: none; background: var(--color-surface); border-right: 1px solid var(--color-border); display: flex; flex-direction: column; }
|
||
.side .logo { padding: 20px; } .side .logo img { height: 32px; }
|
||
.nav { padding: 0 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
|
||
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--color-ink-muted); }
|
||
.nav a.on { background: var(--color-surface-strong); color: var(--color-ink); font-weight: 500; }
|
||
.nav a.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--color-accent); }
|
||
.nav hr { border: 0; border-top: 1px solid var(--color-border); margin: 8px 4px; width: 100%; }
|
||
.side .foot { border-top: 1px solid var(--color-border); padding: 16px; font-size: 14px; }
|
||
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
|
||
.top { height: 52px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--color-border); background: rgba(255,255,255,.95); }
|
||
.top .crumb { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; }
|
||
.top .crumb b { color: var(--color-ink); font-weight: 500; }
|
||
.top .me { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
|
||
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
|
||
.ehead { padding: 12px 24px 0; display: flex; align-items: center; gap: 10px; }
|
||
h1.page { font: 400 22px/1.2 var(--font-serif); margin: 0; white-space: nowrap; }
|
||
h2.sec { font: 400 18px/1.3 var(--font-serif); margin: 0 0 10px; }
|
||
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(31,27,22,.05); }
|
||
.muted { color: var(--color-ink-muted); }
|
||
.small { font-size: 12px; } .s13 { font-size: 13px; } .s14 { font-size: 14px; }
|
||
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--color-surface-strong); white-space: nowrap; }
|
||
.badge.warn { background: #fffbeb; color: #b45309; }
|
||
.badge.danger { background: #fef2f2; color: #b91c1c; }
|
||
.badge.ok { background: color-mix(in srgb, var(--severity-mild) 14%, white); color: #3f5e3f; }
|
||
.badge.accent { background: rgba(184,90,63,.1); color: var(--color-accent-strong); }
|
||
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
|
||
.btn.sm { height: 34px; padding: 0 11px; border-radius: 6px; font-size: 13px; }
|
||
.btn.lg { height: 46px; padding: 0 16px; font-size: 15px; }
|
||
.btn.primary { background: var(--color-accent); color: #fff; }
|
||
.btn.secondary { background: var(--color-surface); border-color: var(--color-border); }
|
||
.btn.ghost { background: transparent; }
|
||
.btn.dangertxt { background: transparent; color: var(--color-danger-strong); }
|
||
.btn.on { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
|
||
.btn[disabled] { opacity: .45; }
|
||
.notice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid; border-radius: 8px; padding: 9px 12px; font-size: 13px; line-height: 1.4; }
|
||
.notice.info { border-color: var(--color-border); background: var(--color-surface-strong); }
|
||
.notice.error { border-color: rgba(192,57,43,.4); background: color-mix(in srgb, var(--color-danger) 8%, white); color: var(--color-danger-strong); }
|
||
.notice.success { border-color: rgba(107,142,107,.4); background: color-mix(in srgb, var(--severity-mild) 10%, white); }
|
||
.notice.warn { border-color: rgba(184,138,63,.45); background: color-mix(in srgb, var(--severity-moderate) 10%, white); }
|
||
.notice svg { flex: none; margin-top: 1px; }
|
||
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
|
||
.field label { font-weight: 500; }
|
||
.inp { height: 36px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); padding: 0 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; }
|
||
.inp.area { height: auto; min-height: 72px; align-items: flex-start; padding: 8px 10px; white-space: normal; line-height: 1.45; font-size: 13px; }
|
||
.inp.focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(184,90,63,.18); }
|
||
.inp .caret { margin-left: auto; }
|
||
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
|
||
.chip.on { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-bg); }
|
||
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--color-border); padding: 0 16px; margin-top: 8px; }
|
||
.tabs a { padding: 10px 14px; font-size: 14px; color: var(--color-ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
|
||
.tabs a.on { color: var(--color-accent-strong); border-color: var(--color-accent); font-weight: 500; }
|
||
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
|
||
.icon.sm { width: 15px; height: 15px; } .icon.lg { width: 22px; height: 22px; }
|
||
.mono { font-family: ui-monospace, 'DejaVu Sans Mono', monospace; font-size: 12px; }
|
||
.annot { background: #fff8e6; border: 1px dashed #c9a35a; color: #6b5323; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; }
|
||
.annot b { color: #4a3916; }
|
||
.annot.inline { padding: 4px 9px; font-size: 12px; align-self: flex-start; }
|
||
/* editor */
|
||
.work { flex: 1; display: flex; gap: 12px; padding: 10px 16px 12px; min-height: 0; }
|
||
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
|
||
.toolbar { display: flex; align-items: center; gap: 6px; }
|
||
.toolbar .sep { width: 1px; height: 24px; background: var(--color-border); margin: 0 4px; }
|
||
.tbtn { height: 36px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-surface); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
|
||
.tbtn.on { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
|
||
.tbtn.ico { width: 36px; padding: 0; justify-content: center; }
|
||
.tbtn[disabled] { opacity: .4; }
|
||
.canvas { position: relative; flex: 1; min-height: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
|
||
.canvas svg.drawing { display: block; }
|
||
.hint { position: absolute; left: 12px; top: 12px; background: rgba(31,27,22,.88); color: #fbf9f5; border-radius: 8px; padding: 7px 11px; font-size: 13px; line-height: 1.35; max-width: 70%; }
|
||
.hint kbd, .kbd { font: 500 11px var(--font-sans); border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 0 4px; }
|
||
.zoombox { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 3px; font-size: 12px; }
|
||
.zoombox span.z { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; }
|
||
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; background: var(--color-ink); color: var(--color-bg); border-radius: 10px; padding: 9px 12px; font-size: 13px; display: flex; gap: 12px; align-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); white-space: nowrap; }
|
||
.toast a { color: #f2c1ae; font-weight: 600; }
|
||
.toast.err { background: #7a2318; }
|
||
.panel { width: 320px; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
|
||
.pcard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
|
||
.phead { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
|
||
.phead .r { margin-left: auto; font-weight: 400; }
|
||
.lrow { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 30px; }
|
||
.lrow .r { margin-left: auto; }
|
||
.sw { width: 18px; height: 18px; border-radius: 5px; flex: none; border: 1px solid rgba(0,0,0,.12); background-image: linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%); background-size: 8px 8px; background-position: 0 0,4px 4px; position: relative; overflow: hidden; }
|
||
.sw i { position: absolute; inset: 0; }
|
||
.sw.lg { width: 26px; height: 26px; border-radius: 7px; }
|
||
.slider { position: relative; height: 22px; display: flex; align-items: center; }
|
||
.slider .track { height: 6px; border-radius: 3px; background: var(--color-surface-strong); border: 1px solid var(--color-border); width: 100%; position: relative; }
|
||
.slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--color-accent); }
|
||
.slider .knob { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--color-accent); transform: translate(-50%,-50%); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
|
||
.slider .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--color-danger); }
|
||
.seg { display: flex; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; font-size: 12px; }
|
||
.seg span { flex: 1; text-align: center; padding: 7px 4px; border-left: 1px solid var(--color-border); white-space: nowrap; }
|
||
.seg span:first-child { border-left: 0; }
|
||
.seg span.on { background: var(--color-ink); color: var(--color-bg); }
|
||
.thumb { width: 54px; height: 40px; border-radius: 6px; border: 1px solid var(--color-border); overflow: hidden; flex: none; background: #fff; }
|
||
.menu { position: absolute; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 10px 28px rgba(31,27,22,.16); padding: 6px; font-size: 13px; z-index: 5; }
|
||
.menu div { padding: 8px 10px; border-radius: 6px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
|
||
.menu div.on { background: var(--color-surface-strong); }
|
||
.menu hr { border: 0; border-top: 1px solid var(--color-border); margin: 4px 0; }
|
||
.pop { position: absolute; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 14px 34px rgba(31,27,22,.2); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; z-index: 6; }
|
||
.dialog-wrap { position: absolute; inset: 0; background: rgba(31,27,22,.42); display: grid; place-items: center; z-index: 8; }
|
||
.dialog { background: var(--color-surface); border-radius: 16px; padding: 20px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 12px; }
|
||
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
|
||
table.t th, table.t td { border-bottom: 1px solid var(--color-border); padding: 6px 6px; text-align: left; vertical-align: middle; }
|
||
table.t th { font-size: 12px; font-weight: 600; color: var(--color-ink-muted); }
|
||
table.t .inp { height: 32px; font-size: 13px; }
|
||
.palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
|
||
.palette span { height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); }
|
||
.palette span.on { outline: 2px solid var(--color-ink); outline-offset: 2px; }
|
||
.ph-top { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); flex: none; font-size: 14px; }
|
||
.ph-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
|
||
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--color-surface); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(31,27,22,.14); padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px; z-index: 4; }
|
||
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--color-border); align-self: center; }
|
||
.ptools { display: flex; justify-content: space-around; border-top: 1px solid var(--color-border); background: var(--color-surface); padding: 6px 4px 10px; flex: none; }
|
||
.ptools span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; min-width: 80px; padding: 0 6px; white-space: nowrap; min-height: 48px; justify-content: center; border-radius: 10px; color: var(--color-ink-muted); }
|
||
.ptools span.on { background: var(--color-ink); color: var(--color-bg); }
|
||
.callout { position: absolute; z-index: 7; }
|
||
.lead { position: absolute; border-top: 1.5px dashed #c9a35a; transform-origin: 0 0; z-index: 7; }
|
||
.vign { display: flex; flex-direction: column; gap: 8px; }
|
||
.vign > .lbl { font-size: 13px; font-weight: 600; }
|
||
/* complement */
|
||
mark { background: #fde7c7; color: inherit; border-radius: 3px; padding: 0 1px; }
|
||
.cb { width: 16px; height: 16px; border: 1.5px solid var(--color-ink-muted); border-radius: 4px; display: inline-grid; place-items: center; flex: none; background: #fff; }
|
||
.cb.on { background: var(--color-accent); border-color: var(--color-accent); }
|
||
.cb.on::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
|
||
.ring { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }
|
||
.tree .lrow { min-height: 26px; }
|
||
.count { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; }
|
||
.sbar { display: flex; align-items: center; gap: 8px; }
|
||
.fpanel { position: absolute; right: 0; top: 0; bottom: 0; background: var(--color-surface); border-left: 1px solid var(--color-border); box-shadow: -10px 0 30px rgba(31,27,22,.12); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
|
||
a.lnk { color: var(--color-accent-strong); text-decoration: underline; }
|
||
.tree .lrow { padding: 2px 0; }
|
||
/* ---------- R0 additions (same tokens, no new colour family) ---------- */
|
||
.hbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 9px; border-radius: 6px; font-size: 14px; color: var(--color-ink); white-space: nowrap; }
|
||
.hbtn[disabled] { opacity: .4; }
|
||
.focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }
|
||
.tip { position: absolute; z-index: 9; background: var(--color-ink); color: var(--color-bg); font-size: 12px; line-height: 1.35; padding: 6px 9px; border-radius: 6px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
|
||
.clr { width: 28px; height: 28px; margin-left: auto; margin-right: -4px; display: grid; place-items: center; border-radius: 6px; color: var(--color-ink-muted); flex: none; }
|
||
.clr.big { width: 44px; height: 44px; margin-right: -10px; }
|
||
.sortsel { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
|
||
.sortsel .inp { min-width: 210px; }
|
||
.rlist { display: flex; flex-direction: column; gap: 8px; }
|
||
.rtile { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
|
||
.rtile.open { border-color: var(--color-border); box-shadow: 0 2px 8px rgba(31,27,22,.06); }
|
||
.rhead { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; min-height: 44px; }
|
||
.rhead .chev { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--color-ink-muted); margin-top: -1px; }
|
||
.rcit { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
|
||
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||
.rmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; width: 168px; }
|
||
.rmeta .cnt { font-size: 12px; color: var(--color-ink-muted); white-space: nowrap; }
|
||
.rbody { border-top: 1px solid var(--color-border); padding: 12px 16px 14px 48px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
|
||
.rdl { display: grid; grid-template-columns: 76px 1fr; gap: 6px 10px; margin: 0; }
|
||
.rdl dt { color: var(--color-ink-muted); }
|
||
.rdl dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.rcited .lrow { min-height: 32px; border-top: 1px solid var(--color-surface-strong); }
|
||
.rcited .path { color: var(--color-ink-muted); }
|
||
.ractions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||
.ractions .sep { width: 1px; height: 22px; background: var(--color-border); margin: 0 2px; }
|
||
.rtile.ph .rhead { flex-wrap: wrap; padding: 10px 12px; }
|
||
.rtile.ph .rmeta { width: auto; flex-direction: row; align-items: center; gap: 8px; padding-left: 34px; flex-basis: 100%; }
|
||
.rtile.ph .rbody { padding: 12px 12px 14px 12px; }
|
||
.rtile.ph .rdl { grid-template-columns: 52px 1fr; }
|
||
.ph-body > * { flex-shrink: 0; }
|
||
.scrollbar { position: absolute; right: 2px; width: 5px; border-radius: 3px; background: rgba(31,27,22,.25); }
|
||
.pbody { flex: 1; min-height: 0; padding: 26px 32px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
|
||
h1.big { font: 400 30px/1.2 var(--font-serif); margin: 0; }
|
||
.srow { display: flex; flex-direction: column; gap: 3px; padding: 11px 16px; border-top: 1px solid var(--color-border); }
|
||
.srow:first-child { border-top: 0; }
|
||
.srow .l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
|
||
.srow .l1 b { font-weight: 500; }
|
||
.srow .l2 { font-size: 13px; color: var(--color-ink-muted); }
|
||
.srow .date { margin-left: auto; font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; }
|
||
.mini { position: relative; width: 250px; height: 170px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg); overflow: hidden; }
|
||
.mini .blk { position: absolute; background: var(--color-surface-strong); border-radius: 4px; }
|
||
.mini .scr { position: absolute; left: 0; right: 0; bottom: 0; top: 46px; background: rgba(31,27,22,.25); }
|
||
.mini .pan { position: absolute; top: 46px; bottom: 0; right: 0; width: 140px; background: var(--color-surface); border-left: 1px solid var(--color-border); box-shadow: -8px 0 18px rgba(31,27,22,.12); }
|
||
.mini .pan i { display: block; height: 8px; margin: 10px 12px 0; border-radius: 3px; background: var(--color-surface-strong); }
|
||
.ccard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(31,27,22,.05); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
|
||
.ccard h2 { font: 400 20px/1.25 var(--font-serif); margin: 0; }
|
||
table.esc { border-collapse: collapse; width: 100%; font-size: 13px; }
|
||
table.esc th, table.esc td { border-bottom: 1px solid var(--color-border); padding: 7px 8px; text-align: left; vertical-align: top; }
|
||
table.esc th { font-size: 12px; color: var(--color-ink-muted); font-weight: 600; }
|
||
table.esc td.n { font-weight: 700; color: var(--color-accent-strong); width: 22px; }
|
||
/* ---------- U2 additions (same tokens, no new colour family) ---------- */
|
||
.side { width: 256px; }
|
||
.work.u2 { flex-direction: column; gap: 0; padding: 10px 32px 12px; }
|
||
.work.u2.tab { padding: 10px 22px 12px; }
|
||
.btn.danger { background: var(--color-danger); color: #fff; }
|
||
.strip { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; min-width: 0; }
|
||
.strip.act { background: var(--color-surface-strong); }
|
||
.strip.alert { border-color: rgba(192,57,43,.45); background: color-mix(in srgb, var(--color-danger) 6%, white); }
|
||
.strip.big { height: 62px; }
|
||
.strip .slead { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; min-width: 0; max-width: 420px; overflow: hidden; }
|
||
.strip .slead2 { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; flex: 0 1 auto; max-width: 400px; }
|
||
.strip .slead2 .l1 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; min-width: 0; }
|
||
.strip .slead2 .l1 .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||
.strip .slead2 .l1 .badge { flex: none; font-weight: 500; }
|
||
.strip .slead2 .l2 { font-size: 12px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 23px; }
|
||
.strip.alert .slead2 .l2 { color: var(--color-danger-strong); font-weight: 600; }
|
||
.strip .stxt { font-size: 13px; line-height: 1.3; color: var(--color-ink-muted); overflow: hidden; min-width: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
||
.strip.alert .stxt { color: var(--color-danger-strong); }
|
||
.strip .sact { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
|
||
.sz { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; margin-right: 8px; }
|
||
.sz .slider { height: 28px; }
|
||
.sz.big .slider { height: 44px; }
|
||
.sz.big .knob { width: 28px; height: 28px; }
|
||
.snap { position: absolute; top: 13px; width: 2px; height: 7px; background: var(--color-ink-muted); transform: translateX(-1px); border-radius: 1px; }
|
||
.dback { position: absolute; inset: 0; background: rgba(31,27,22,.22); z-index: 8; }
|
||
.dlgu { position: absolute; top: 0; right: 0; z-index: 9; background: var(--color-surface); border-radius: 16px; box-shadow: 0 18px 40px rgba(31,27,22,.28); display: flex; flex-direction: column; overflow: hidden; }
|
||
.dlgu.static { position: relative; }
|
||
.dlgu .dh { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--color-border); padding: 6px 6px 6px 24px; }
|
||
.dlgu .dh h2 { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.3; flex: 1; min-width: 0; }
|
||
.dlgu .dx { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; flex: none; }
|
||
.dlgu .db { padding: 14px 24px 14px; display: flex; flex-direction: column; gap: 11px; }
|
||
.dlgu .df { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 0 24px 16px; }
|
||
.rd { display: grid; grid-template-columns: 112px 1fr; gap: 7px 10px; margin: 0; font-size: 14px; }
|
||
.rd dt { color: var(--color-ink-muted); font-size: 13px; padding-top: 1px; }
|
||
.rd dd { margin: 0; min-width: 0; display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; }
|
||
.inp.bad { border-color: rgba(192,57,43,.6); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
|
||
.toastu { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--color-ink); color: var(--color-bg); border-radius: 10px; padding: 6px 6px 6px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; white-space: nowrap; box-shadow: 0 8px 20px rgba(31,27,22,.25); z-index: 3; }
|
||
.toastu .ua { color: #f2c1ae; font-weight: 600; padding: 5px 9px; border-radius: 6px; }
|
||
.toastu.err { background: #7a2318; padding-right: 14px; }
|
||
.ocard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
|
||
.ocard .ot { display: flex; align-items: center; font-size: 14px; font-weight: 600; }
|
||
.ocard .ot .r { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--color-ink-muted); }
|
||
.arow { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 30px; padding: 0 6px; border-radius: 6px; }
|
||
.arow.cur { background: var(--color-surface-strong); }
|
||
.arow.on { background: var(--color-surface-strong); box-shadow: inset 2px 0 0 var(--color-accent); }
|
||
.arow .k { width: 38px; color: var(--color-ink-muted); font-size: 12px; flex: none; }
|
||
.arow .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.steps { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
|
||
.steps .st { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
|
||
.steps .st .no { width: 24px; height: 24px; border-radius: 50%; background: var(--color-surface-strong); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
|
||
.steps .st.bad .no { background: color-mix(in srgb, var(--color-danger) 14%, white); color: var(--color-danger-strong); }
|
||
.steps .st.good .no { background: color-mix(in srgb, var(--severity-mild) 18%, white); color: #3f5e3f; }
|
||
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 12px; background: var(--color-surface); white-space: nowrap; }
|
||
.ocard > .inp { flex: none; }
|
||
.arow { min-height: 36px; }
|
||
.entry { height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--color-border); display: inline-flex; align-items: center; font-size: 13px; background: var(--color-surface); white-space: nowrap; }
|
||
.msg { margin-left: auto; height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; border-radius: 8px; background: var(--color-ink); color: var(--color-bg); font-size: 13px; white-space: nowrap; max-width: 330px; }
|
||
.msg.big { height: 44px; }
|
||
.msg .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
||
.msg .ua { color: #f2c1ae; font-weight: 600; padding: 4px 8px; border-radius: 6px; flex: none; }
|
||
.msg.err { background: #7a2318; padding-right: 12px; max-width: 560px; }
|
||
.arrowpad { display: inline-flex; gap: 4px; margin-right: 6px; }
|
||
.arrowpad .btn { width: 34px; padding: 0; font-size: 16px; }
|
||
.arrowpad.big .btn { width: 44px; height: 44px; }
|
||
.geo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--color-surface-strong); }
|
||
.geo a { color: var(--color-accent-strong); text-decoration: underline; font-weight: 500; }
|
||
.ferr { font-size: 12px; color: var(--color-danger-strong); }
|
||
.racts { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--color-border); padding-top: 12px; }
|
||
.racts .r1, .racts .r2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||
.racts .r2 { justify-content: space-between; }
|
||
.inp .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
|
||
.inp .v .sw { display: inline-block; vertical-align: -4px; margin-right: 8px; }
|
||
.tab-frame .hbtn { height: 44px; }
|
||
.tab-frame .tabs a { min-height: 44px; }
|
||
.inp .caret { flex: none; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<svg width="0" height="0" style="position:absolute">
|
||
<symbol id="i-dashboard" viewBox="0 0 24 24"><path d="M4 4h7v7H4zM13 4h7v4h-7zM13 11h7v9h-7zM4 14h7v6H4z"/></symbol>
|
||
<symbol id="i-users" viewBox="0 0 24 24"><path d="M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM2 21a7 7 0 0 1 14 0M16 3.5a4 4 0 0 1 0 7M22 21a7 7 0 0 0-4.5-6.5"/></symbol>
|
||
<symbol id="i-paw" viewBox="0 0 24 24"><path d="M5.5 12a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6zM9 8.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8zM15 8.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8zM18.5 12a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6zM12 11c-3 0-5.5 4.5-5.5 6.5 0 2 2 2.5 3 2.2 1-.3 1.6-.7 2.5-.7s1.5.4 2.5.7c1 .3 3-.2 3-2.2 0-2-2.5-6.5-5.5-6.5z"/></symbol>
|
||
<symbol id="i-user" viewBox="0 0 24 24"><path d="M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0"/></symbol>
|
||
<symbol id="i-tool" viewBox="0 0 24 24"><path d="M14 3l7 7-4 4-7-7zM10 10l-6 6 4 4 6-6M3 21l3-3"/></symbol>
|
||
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12l5 5L20 7"/></symbol>
|
||
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 9v4M12 17h.01M10.3 3.9L2.8 17a2 2 0 0 0 1.7 3h15a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/></symbol>
|
||
<symbol id="i-info" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 11v5M12 8h.01"/></symbol>
|
||
<symbol id="i-menu" viewBox="0 0 24 24"><path d="M4 7h16M4 12h16M4 17h16"/></symbol>
|
||
<symbol id="i-close" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18"/></symbol>
|
||
<symbol id="i-book" viewBox="0 0 24 24"><path d="M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2zM4 21V5M8 7h7M8 11h5"/></symbol>
|
||
<symbol id="i-shield" viewBox="0 0 24 24"><path d="M12 3l8 3v6c0 4.5-3.4 8-8 9-4.6-1-8-4.5-8-9V6zM9 12l2 2 4-4"/></symbol>
|
||
<symbol id="i-search" viewBox="0 0 24 24"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM20 20l-4-4"/></symbol>
|
||
<symbol id="i-cursor" viewBox="0 0 24 24"><path d="M5 3l14 7-6 2-2 6z"/></symbol>
|
||
<symbol id="i-point" viewBox="0 0 24 24"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 2v3M12 19v3M2 12h3M19 12h3"/></symbol>
|
||
<symbol id="i-zone" viewBox="0 0 24 24"><path d="M5 7l7-4 7 5-2 10-9 2-3-6z"/></symbol>
|
||
<symbol id="i-crop" viewBox="0 0 24 24"><path d="M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"/></symbol>
|
||
<symbol id="i-hand" viewBox="0 0 24 24"><path d="M8 13V5.5a1.5 1.5 0 0 1 3 0V12M11 11V4a1.5 1.5 0 0 1 3 0v7M14 11V5.5a1.5 1.5 0 0 1 3 0V13M17 9.5a1.5 1.5 0 0 1 3 0V15a7 7 0 0 1-7 7h-1a7 7 0 0 1-5.5-2.7L3.6 15.5a1.6 1.6 0 0 1 2.5-2L8 15.5"/></symbol>
|
||
<symbol id="i-undo" viewBox="0 0 24 24"><path d="M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></symbol>
|
||
<symbol id="i-redo" viewBox="0 0 24 24"><path d="M15 14l5-5-5-5M20 9H10a6 6 0 0 0 0 12h3"/></symbol>
|
||
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
|
||
<symbol id="i-minus" viewBox="0 0 24 24"><path d="M5 12h14"/></symbol>
|
||
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16M10 11v6M14 11v6M5 7l1 13h12l1-13M9 7V4h6v3"/></symbol>
|
||
<symbol id="i-lock" viewBox="0 0 24 24"><path d="M6 11h12v10H6zM8 11V7a4 4 0 0 1 8 0v4"/></symbol>
|
||
<symbol id="i-eye" viewBox="0 0 24 24"><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></symbol>
|
||
<symbol id="i-chevron" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></symbol>
|
||
<symbol id="i-down" viewBox="0 0 24 24"><path d="M6 9l6 6 6-6"/></symbol>
|
||
<symbol id="i-up" viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></symbol>
|
||
<symbol id="i-move" viewBox="0 0 24 24"><path d="M12 2v20M2 12h20M12 2l-3 3M12 2l3 3M12 22l-3-3M12 22l3-3M2 12l3-3M2 12l3 3M22 12l-3-3M22 12l-3 3"/></symbol>
|
||
<symbol id="i-pen" viewBox="0 0 24 24"><path d="M4 20l4-1 11-11-3-3L5 16zM14 6l3 3"/></symbol>
|
||
<symbol id="i-image" viewBox="0 0 24 24"><path d="M4 4h16v16H4zM4 16l5-5 4 4 3-3 4 4M15 9h.01"/></symbol>
|
||
<symbol id="i-gear" viewBox="0 0 24 24"><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-2.9-1.2l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 15H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.2-2.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 9 4.6V4a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 2.9 1.2l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A1.7 1.7 0 0 0 20.9 11H21a2 2 0 1 1 0 4z"/></symbol>
|
||
<symbol id="i-dots" viewBox="0 0 24 24"><path d="M12 6h.01M12 12h.01M12 18h.01"/></symbol>
|
||
<symbol id="i-grip" viewBox="0 0 24 24"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></symbol>
|
||
<symbol id="i-clock" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2"/></symbol>
|
||
<symbol id="i-spin" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9"/></symbol>
|
||
<symbol id="i-cloud-off" viewBox="0 0 24 24"><path d="M3 3l18 18M8 8a5 5 0 0 0-3 9h11M18 17a4 4 0 0 0-1.5-7.7A6 6 0 0 0 10.6 5"/></symbol>
|
||
<symbol id="i-layers" viewBox="0 0 24 24"><path d="M12 3l9 5-9 5-9-5zM3 13l9 5 9-5"/></symbol>
|
||
<symbol id="i-fit" viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></symbol>
|
||
<symbol id="i-spine" viewBox="0 0 24 24"><path d="M6 5h12M7 9h10M6 13h12M7 17h10M12 3v18"/></symbol>
|
||
<symbol id="i-file" viewBox="0 0 24 24"><path d="M6 3h8l4 4v14H6zM14 3v4h4"/></symbol>
|
||
<symbol id="i-copy" viewBox="0 0 24 24"><path d="M9 9h11v11H9zM5 15H4V4h11v1"/></symbol>
|
||
<symbol id="i-external" viewBox="0 0 24 24"><path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/></symbol>
|
||
<symbol id="i-sort" viewBox="0 0 24 24"><path d="M7 4v16M7 20l-3-3M7 20l3-3M17 20V4M17 4l-3 3M17 4l3 3"/></symbol>
|
||
<symbol id="i-deselect" viewBox="0 0 24 24"><path d="M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3M9 9l6 6M15 9l-6 6"/></symbol>
|
||
</svg>
|
||
|
||
<script src="data.js"></script>
|
||
<script>
|
||
/* ---------- data: window.DOC (data.js, generated by gen-data.cjs from the equine draft document.json) ---------- */
|
||
const HORSE = '../../../supabase/seed/anatomical-sheets/equine/draft/assets/horse.svg'
|
||
const LOGO = '../../../apps/app/public/logo-horizontal.svg'
|
||
const W = 2073.4, H = 1629.4
|
||
const DOC = window.DOC
|
||
// Category colours and names come from the draft (U2 ships before U6: no fixed categories yet, real names shown).
|
||
const KEY = { articulations: 'art', os: 'os', 'charnieres-vertebrales': 'charn', 'zone-colonne': 'vert', 'cadrans-du-crane': 'crane' }
|
||
const OPA = { art: .35, os: .35, charn: .35, vert: .30, crane: .35 }
|
||
const CATS = Object.fromEntries(DOC.categories.map((c) => [KEY[c.id], { id: c.id, fr: c.fr, en: c.en, c: c.color, o: OPA[KEY[c.id]] }]))
|
||
const catOf = (id) => CATS[KEY[id]]
|
||
const viewName = (id) => DOC.views.find((v) => v.id === id).fr
|
||
const DETAIL = DOC.views.find((v) => v.parent).id
|
||
const ANN = DOC.annotations
|
||
// A trigger without a name shows its view's name, as the core does (index_data.rs:39).
|
||
const nameOf = (a) => a.fr || viewName(DETAIL)
|
||
const A = ANN.map((a) => [a.view, a.kind === 'detail_trigger' ? 'link' : KEY[a.cat], nameOf(a), a.g, a.id])
|
||
const pts = (p) => p.map((q) => q.join(',')).join(' ')
|
||
const annById = Object.fromEntries(ANN.map((a) => [a.id, a]))
|
||
// As built (creation.ts LATERALITIES, fr.ts:1657-1660).
|
||
const LAT = { unpaired: 'Non latéralisée', bilateral: 'Bilatérale', left: 'Gauche', right: 'Droite' }
|
||
// As built ReviewBadge tones: warn, accent, neutral (ReviewBadge.tsx:5-9).
|
||
const ST = { to_confirm: ['warn', 'À confirmer'], reviewed: ['accent', 'Relu'], inherited: ['', 'Hérité, non relu'] }
|
||
const status = (s) => `<span class="badge ${ST[s][0]}">${ST[s][1]}</span>`
|
||
const REGION = Object.fromEntries(DOC.regions.map((r) => [r.code, r.fr]))
|
||
const KIND = { point: 'Point', zone: 'Zone', detail_trigger: 'Accès' }
|
||
const countView = (id) => ANN.filter((a) => a.view === id).length
|
||
// French plural as the editor's mechanism (C36): 0 and 1 take the singular.
|
||
const pl = (n, one, many) => `${n.toLocaleString('fr-FR')} ${n <= 1 ? one : many}`
|
||
const STIFLE = annById.stifle, THOR = annById.thoracic.g[1]
|
||
</script>
|
||
<script>
|
||
/* ---------- drawing ---------- */
|
||
// opts: vb [x,y,w,h], w px, view, sel (name), hide [names], extra(u) markup, cats override, dim
|
||
function drawing(o) {
|
||
const vb = o.vb || [0, 0, W, H]
|
||
const w = o.w, h = o.h || Math.round(w * vb[3] / vb[2])
|
||
const u = vb[2] / w * (o.fitH ? (w * vb[3] / vb[2]) / h : 1)
|
||
const uu = Math.max(vb[2] / w, vb[3] / h)
|
||
const cats = o.cats || CATS
|
||
let s = `<svg class="drawing" width="${w}" height="${h}" viewBox="${vb.join(' ')}" preserveAspectRatio="xMidYMid meet"><image href="${HORSE}" x="0" y="0" width="${W}" height="${H}"${o.dim ? ' opacity=".45"' : ''}/>`
|
||
if (!o.noAnn) for (const [view, cat, name, g] of A) {
|
||
if (view !== (o.view || 'main') || (o.hide || []).includes(name)) continue
|
||
if (cat === 'link') {
|
||
if (o.links === false) continue
|
||
s += `<polygon points="${pts(g[1])}" fill="rgba(31,27,22,.05)" stroke="#1f1b16" stroke-width="${2 * uu}" stroke-dasharray="${8 * uu} ${5 * uu}"/>`
|
||
continue
|
||
}
|
||
const k = cats[cat], fo = o.faint ? k.o * .45 : k.o, so = o.faint ? .5 : 1
|
||
const st = `fill="${k.c}" fill-opacity="${fo}" stroke="${k.c}" stroke-opacity="${so}" stroke-width="${2 * uu}"`
|
||
s += g[0] === 'c' ? `<circle cx="${g[1]}" cy="${g[2]}" r="${g[3]}" ${st}/>` : `<polygon points="${pts(g[1])}" ${st}/>`
|
||
}
|
||
if (o.extra) s += o.extra(uu)
|
||
return s + '</svg>'
|
||
}
|
||
// vertex handle, midpoint plus, minus bubble, selection outline; u = user units per screen px
|
||
// U2: the chosen vertex is larger, filled with the accent, with a white halo and an accent ring (never colour alone).
|
||
const V = (x, y, u, on, big) => on
|
||
? `<circle cx="${x}" cy="${y}" r="${(big ? 15 : 11) * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/><circle cx="${x}" cy="${y}" r="${(big ? 10 : 7.5) * u}" fill="#b85a3f" stroke="#fff" stroke-width="${2.5 * u}"/>`
|
||
: `<circle cx="${x}" cy="${y}" r="${(big ? 9 : 6) * u}" fill="#fff" stroke="#1f1b16" stroke-width="${2 * u}"/>`
|
||
const HIT = (x, y, u) => `<circle cx="${x}" cy="${y}" r="${22 * u}" fill="rgba(184,90,63,.14)" stroke="#b85a3f" stroke-width="${1.8 * u}" stroke-dasharray="${4 * u} ${3 * u}"/>`
|
||
const PLUS = (x, y, u, big) => { const r = (big ? 12 : 8) * u, l = r * .55; return `<g><circle cx="${x}" cy="${y}" r="${r}" fill="#fff" stroke="#b85a3f" stroke-width="${1.6 * u}"/><path d="M${x - l} ${y}h${2 * l}M${x} ${y - l}v${2 * l}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-linecap="round"/></g>` }
|
||
const MINUS = (x, y, u, big, off) => { const bw = (big ? 44 : 30) * u, bh = (big ? 36 : 26) * u, yy = y - (big ? 30 : 22) * u - bh; const c = off ? '#b9b0a3' : '#c0392b'; return `<g><rect x="${x - bw / 2}" y="${yy}" width="${bw}" height="${bh}" rx="${8 * u}" fill="${c}"/><path d="M${x - 5 * u} ${yy + bh}l${5 * u} ${6 * u}l${5 * u} ${-6 * u}z" fill="${c}"/><path d="M${x - bw * .22} ${yy + bh / 2}h${bw * .44}" stroke="#fff" stroke-width="${2.6 * u}" stroke-linecap="round"/></g>` }
|
||
const SEL = (p, u) => `<polygon points="${pts(p)}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}"/>`
|
||
const mids = (p) => p.map((q, i) => { const n = p[(i + 1) % p.length]; return [(q[0] + n[0]) / 2, (q[1] + n[1]) / 2] })
|
||
function polyEdit(p, u, o = {}) {
|
||
let s = SEL(p, u)
|
||
if (!o.noPlus) s += mids(p).filter((m, i) => { const n = p[(i + 1) % p.length]; return !o.minSeg || Math.hypot(n[0] - p[i][0], n[1] - p[i][1]) / u >= o.minSeg }).map(m => PLUS(m[0], m[1], u, o.big)).join('')
|
||
s += p.map((q, i) => V(q[0], q[1], u, i === o.on, o.big)).join('')
|
||
if (o.on != null && o.minus !== false) s += MINUS(p[o.on][0], p[o.on][1], u, o.big, o.minusOff)
|
||
return s
|
||
}
|
||
|
||
/* ---------- editor stage helpers, copied unchanged ---------- */
|
||
function toolbar(on, o = {}) {
|
||
const t = (k, i, l, key) => `<span class="tbtn ${on === k ? 'on' : ''}" title="${key}">${ico(i, 'sm')}${l}</span>`
|
||
return `<div class="toolbar">${t('sel', 'cursor', 'Sélectionner', 'V')}${t('point', 'point', 'Ajouter un point', 'P')}${t('zone', 'zone', 'Ajouter une zone', 'Z')}${t('crop', 'crop', 'Créer une vue détaillée', 'D')}
|
||
</div>`
|
||
}
|
||
const bigPills = (z) => `${vchip()}<div class="zoombox" style="padding:4px"><span class="z" style="width:44px;height:44px">${ico('minus')}</span><span style="min-width:48px;text-align:center">${z}</span><span class="z" style="width:44px;height:44px">${ico('plus')}</span><span class="z" style="width:44px;height:44px">${ico('fit')}</span></div>`
|
||
const vchip = (v = DOC.views[0].fr) => `<span class="chip" style="position:absolute;right:10px;top:10px;background:rgba(255,255,255,.95)">${ico('layers', 'sm')}${v}</span>`
|
||
const zoom = (z = '100 %') => `${vchip()}<div class="zoombox"><span class="z">${ico('minus', 'sm')}</span><span style="min-width:42px;text-align:center">${z}</span><span class="z">${ico('plus', 'sm')}</span><span class="z" title="Ajuster">${ico('fit', 'sm')}</span></div>`
|
||
const sw = (c, o, cls = '') => `<span class="sw ${cls}"><i style="background:${c};opacity:${o}"></i></span>`
|
||
|
||
/* ---------- R0 shell: U1 as built (DraftHeader, EditorTabs, HistoryButtons, SaveLine) + the R0 changes ---------- */
|
||
const NAV = [['dashboard','Tableau de bord'],['users','Clients'],['paw','Animaux'],['book','Fiches anatomiques'],['HR'],['shield','Administration'],['HR'],['user','Mon compte'],['tool','Outil de bilan']]
|
||
const ico = (n, c = '') => `<svg class="icon ${c}" aria-hidden="true"><use href="#i-${n}"/></svg>`
|
||
// noAdmin: an account without capability (board 01 v1-2-4) has no « Administration » entry.
|
||
const side = (on = 'Administration', noAdmin = false) => `<aside class="side"><div class="logo"><img src="${LOGO}" alt="Faunosteo"></div><nav class="nav">${NAV.filter(([, l], k) => !noAdmin || (l !== 'Administration' && k !== 4)).map(([i, l]) => i === 'HR' ? '<hr>' : `<a class="${l === on ? 'on' : ''}">${ico(i)}${l}</a>`).join('')}</nav><div class="foot muted">Se déconnecter</div></aside>`
|
||
const ME = `<span class="me"><span class="avatar">BC</span>Bastien Chanot</span>`
|
||
// R0: five tabs, Références between Constats and Vérification (owner brief §1).
|
||
const TABS = ['Général', 'Annotations', 'Constats', 'Références', 'Vérification']
|
||
// R0 §2: « Défaire » / « Refaire »; name = aria-label, title adds the real shortcut (useUndoShortcuts.ts: Ctrl+Z, Ctrl+Maj+Z, no Ctrl+Y).
|
||
const HIST = {
|
||
undo: ['undo', 'Défaire', 'Défaire la dernière modification', 'Ctrl+Z ou ⌘Z'],
|
||
redo: ['redo', 'Refaire', 'Refaire la dernière modification défaite', 'Ctrl+Maj+Z ou ⇧⌘Z'],
|
||
}
|
||
const hbtn = (k, o = {}) => { const [i, l, n, s] = HIST[k]; return `<span class="hbtn ${o.focus ? 'focus' : ''}" title="${n} (${s})"${o.off ? ' disabled' : ''}>${ico(i, 'sm')}${o.iconOnly ? '' : l}</span>` }
|
||
const hist = (o = {}) => `<span style="margin-left:auto;align-self:center;display:flex;gap:4px;padding-bottom:3px;position:relative">${hbtn('undo', { focus: o.focusUndo, off: o.ro })}${hbtn('redo', { off: true })}${o.tip ? `<span style="position:absolute;top:24px;left:58px;z-index:10">${ico('cursor', 'sm')}</span><span class="tip" style="top:44px;right:60px">${HIST.undo[2]} (${HIST.undo[3]})</span>` : ''}</span>`
|
||
function tabs(on, o = {}) {
|
||
return '<div class="tabs">' + TABS.map(t => `<a class="${t === on ? 'on' : ''}">${t}${t === 'Vérification' ? ' <span class="badge danger">2 erreurs</span>' : ''}</a>`).join('') + hist(o) + '</div>'
|
||
}
|
||
const UNSAVED = '3 modifications non enregistrées'
|
||
function saveLine(o = {}) {
|
||
if (o.ro) return `<span class="s13 muted" style="white-space:nowrap">Révision 11</span>`
|
||
return `<span class="s13 muted" style="white-space:nowrap">${o.unsaved || UNSAVED}</span><span class="btn secondary sm">Abandonner les modifications</span><span class="btn primary sm">Enregistrer</span>`
|
||
}
|
||
// R0: no « Références » button in the header any more (owner brief §1).
|
||
function header(o = {}) {
|
||
return `<div class="ehead"><h1 class="page">Brouillon, version 4</h1><span class="badge">Brouillon</span><span class="badge">Copie de travail</span>${o.ro ? `<span class="badge">${ico('lock', 'sm')}Lecture seule</span>` : ''}
|
||
<span style="margin-left:auto;display:flex;gap:8px;align-items:center">${saveLine(o)}</span></div>`
|
||
}
|
||
const CRUMB = 'Administration › Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b>'
|
||
function editor(o) {
|
||
return `<div class="frame desk" style="height:${o.h || 800}px">${side()}<div class="main">
|
||
<div class="top"><span class="crumb">${CRUMB}</span>${ME}</div>
|
||
${header(o)}${o.notice ? `<div style="padding:8px 24px 0">${o.notice}</div>` : ''}${tabs(o.tab, o)}
|
||
<div class="work">${o.body}</div>${o.overlay || ''}</div></div>`
|
||
}
|
||
function pageFrame(o) {
|
||
return `<div class="frame desk" style="height:${o.h || 800}px;${o.w ? `width:${o.w}px` : ''}">${o.noSide ? '' : side(o.nav, o.noAdmin)}<div class="main">
|
||
<div class="top"><span class="crumb" style="color:var(--color-ink)">${o.crumb}</span>${o.me || ME}</div>
|
||
<div class="pbody">${o.body}</div></div></div>`
|
||
}
|
||
const note = (html, style = '') => `<div class="annot" style="${style}">${html}</div>`
|
||
const vframe = (w, h, inner, style = '') => `<div class="frame" style="width:${w}px;height:${h}px;display:flex;flex-direction:column;gap:10px;padding:14px;${style}">${inner}</div>`
|
||
|
||
|
||
/* ---------- U2 helpers (same tokens; the Annotations tab as built + the U2 proposal) ---------- */
|
||
// Tool column as built (ToolColumn.tsx: 44 px icon-only buttons, aria-label = title, zoom under the separator).
|
||
const GL = { select: 'M5 3l12 7-5 1-3 5z', point: 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM12 3v3M12 18v3M3 12h3M18 12h3', zone: 'M12 3l8 6-3 10H7L4 9z', link: 'M4 4h8v8H4zM12 12h8v8h-8z', out: 'M5 11h12M20 20l-4-4', in: 'M11 5v12M5 11h12M20 20l-4-4', fit: 'M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5' }
|
||
const glyph = (k) => `<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${GL[k]}"/></svg>`
|
||
const tbtn44 = (k, label, on) => `<span title="${label}" style="width:44px;height:44px;display:grid;place-items:center;border-radius:8px;border:1px solid var(--color-border);${on ? 'background:var(--color-ink);color:#fff' : 'background:var(--color-surface);color:var(--color-ink)'}">${glyph(k)}</span>`
|
||
function toolCol(on = 'select') {
|
||
return `<div role="toolbar" style="display:flex;flex-direction:column;gap:8px;flex:none">${tbtn44('select', 'Sélectionner et déplacer', on === 'select')}${tbtn44('point', 'Point', on === 'point')}${tbtn44('zone', 'Zone', on === 'zone')}${tbtn44('link', 'Accès à une vue détaillée', on === 'link')}<hr style="border:0;border-top:1px solid var(--color-border);margin:0;width:44px">${tbtn44('out', 'Zoom arrière')}${tbtn44('in', 'Zoom avant')}${tbtn44('fit', 'Ajuster')}</div>`
|
||
}
|
||
// big = touch layout (board 13): every control of the tab at 44 px.
|
||
const VIEWCHIPS = (on = 'main', big) => `<div style="display:flex;gap:8px;flex:none">${DOC.views.map((v) => `<span class="chip ${v.id === on ? 'on' : ''}" style="height:${big ? 44 : 30}px">${v.fr}</span>`).join('')}</div>`
|
||
const B = (label, cls = 'secondary', o = {}) => `<span class="btn ${cls} ${o.big ? '' : 'sm'} ${o.focus ? 'focus' : ''}" style="${o.big ? 'height:44px;' : ''}${o.style || ''}"${o.off ? ' disabled' : ''}${o.title ? ` title="${o.title}"` : ''}>${o.icon ? ico(o.icon, 'sm') : ''}${label}</span>`
|
||
// The message after a gesture (proposal, A14): in the row under the drawing, never over the handles; polite status.
|
||
const msg = (text, o = {}) => `<span class="msg ${o.err ? 'err' : ''} ${o.big ? 'big' : ''}" role="${o.err ? 'alert' : 'status'}"><span class="t">${text}</span>${o.err ? '' : '<span class="ua">Défaire</span>'}</span>`
|
||
const ADDROW = (o = {}) => `<div style="display:flex;gap:8px;align-items:center;flex:none">${['Ajouter un point', 'Ajouter une zone', 'Ajouter un accès'].map((l) => `<span class="btn secondary ${o.big ? '' : 'sm'}" style="${o.big ? 'height:44px' : ''}"${o.addOff ? ' disabled' : ''}>${l}</span>`).join('')}${o.msg || ''}</div>`
|
||
|
||
// The point size slider (choice 3 b): snaps on the sizes used in the view, no number, red minimum mark.
|
||
// The mark's place comes from the core at U2 (one read-only value per view); drawn here near r 24 of the main view.
|
||
const SMIN = 12, SMAX = 72, MINR = { main: 24.1, head: 24.1 }
|
||
const pct = (r) => ((r - SMIN) / (SMAX - SMIN) * 100).toFixed(1)
|
||
function sizeSlider(r, o = {}) {
|
||
const view = o.view || 'main'
|
||
const snaps = Object.keys(DOC.sizes[view]).map(Number)
|
||
const ticks = snaps.map((s) => `<span class="snap" style="left:${pct(s)}%"></span>`).join('')
|
||
return `<span class="sz ${o.big ? 'big' : ''}"><span>Taille</span><span class="slider" style="width:${o.w || 150}px"><span class="track"><span class="fill" style="width:${pct(r)}%"></span><span class="mark" style="left:${pct(MINR[view])}%"></span>${ticks}</span><span class="knob ${o.focus ? 'focus' : ''}" style="left:${pct(r)}%"></span></span></span>`
|
||
}
|
||
// Single-pointer alternative to dragging (WCAG 2.5.7, proposal A11): four step buttons in the move mode.
|
||
const ARROWS = (big) => `<span class="arrowpad ${big ? 'big' : ''}">${[['←', 'Déplacer vers la gauche'], ['↑', 'Déplacer vers le haut'], ['↓', 'Déplacer vers le bas'], ['→', 'Déplacer vers la droite']].map(([g, t]) => `<span class="btn secondary ${big ? '' : 'sm'}" title="${t}">${g}</span>`).join('')}</span>`
|
||
|
||
// The contextual strip (proposal A6): one fixed-height bar above the drawing and the overview, never in the drawing.
|
||
// Left: two lines (what is selected or going on, then its detail); middle: a message slot; right: the commands.
|
||
const lead2 = (icon, name, badge, sub) => `<span class="slead2"><span class="l1">${ico(icon, 'sm')}<span class="nm">${name}</span>${badge || ''}</span>${sub ? `<span class="l2">${sub}</span>` : ''}</span>`
|
||
function strip(o) {
|
||
return `<div class="strip ${o.act ? 'act' : ''} ${o.alert ? 'alert' : ''} ${o.big ? 'big' : ''}"${o.alert ? ' role="alert"' : ''}>${o.lead || ''}${o.text ? `<span class="stxt">${o.text}</span>` : '<span style="flex:1"></span>'}<span class="sact">${o.actions || ''}</span></div>`
|
||
}
|
||
// Selection strip. Point: size slider, « Déplacer le point »; zone: « Déplacer la zone » (« Déplacer le sommet » while a
|
||
// vertex is chosen), « Redessiner »; then « Propriétés », « Désélectionner ». Read-only: « Propriétés », « Désélectionner ».
|
||
function selStrip(a, o = {}) {
|
||
const n = a.kind === 'point' ? 0 : a.g[1].length
|
||
const sub = o.sub || (a.kind === 'point' ? 'Point' : `Zone · ${n} sommets${o.vertex ? ` · sommet ${o.vertex} choisi` : ''}`) + (o.ro ? ' · fiche en lecture seule' : '')
|
||
const geo = a.kind === 'point'
|
||
? `${sizeSlider(o.r || a.g[3], { big: o.big, focus: o.focusSize, w: o.big ? 170 : 150 })}${B('Déplacer le point', 'secondary', { big: o.big, icon: 'move' })}`
|
||
: `${B(o.vertex ? 'Déplacer le sommet' : 'Déplacer la zone', 'secondary', { big: o.big, icon: 'move' })}${o.noRedraw ? '' : B('Redessiner', 'secondary', { big: o.big, icon: 'pen' })}`
|
||
return strip({ big: o.big, alert: o.alert, lead: lead2(a.kind === 'point' ? 'point' : 'zone', nameOf(a), status(a.status), sub), text: o.text || '',
|
||
actions: `${o.ro ? '' : geo}${B('Propriétés', 'secondary', { big: o.big, icon: 'file', focus: o.focusProps })}${B('Désélectionner', 'secondary', { big: o.big, icon: 'deselect' })}` })
|
||
}
|
||
|
||
// Right column as built (OverviewPanel: Vues, Catégories, Annotations de la vue; entries 44 px, rows about 36 px),
|
||
// kept beside the drawing (proposal A3): the selected annotation's row is marked.
|
||
function overview(o = {}) {
|
||
const view = o.view || 'main'
|
||
const vrows = DOC.views.map((v) => `<div class="arow ${v.id === view ? 'cur' : ''}" style="min-height:${o.big ? 48 : 42}px"><span style="flex:1;min-width:0"><span style="font-weight:500;display:block">${v.fr}</span><span class="small muted">${v.parent ? 'Vue détaillée' : 'Vue principale'}</span></span><span class="small muted">${pl(countView(v.id), 'annotation', 'annotations')}</span></div>`).join('')
|
||
const views = `<div class="ocard"><div class="ot">Vues</div>${vrows}<span class="entry" style="align-self:flex-start">Gérer les vues</span></div>`
|
||
const chips = DOC.categories.map((c) => `<span class="chip" style="height:26px;font-size:12px;padding:0 9px">${sw(c.color, OPA[KEY[c.id]])}${c.fr}</span>`).join('')
|
||
const cats = `<div class="ocard"><div class="ot">Catégories<span class="r">${DOC.categories.length}</span></div><div style="display:flex;flex-wrap:wrap;gap:6px">${chips}</div><div style="display:flex;gap:6px;flex-wrap:wrap"><span class="entry">Modifier les catégories</span><span class="entry">Régions vertébrales (${pl(DOC.regions.length, 'région', 'régions')})</span></div></div>`
|
||
const rows = []
|
||
for (const c of DOC.categories) {
|
||
const list = ANN.filter((a) => a.view === view && a.cat === c.id)
|
||
if (!list.length) continue
|
||
const head = `<div class="arow" style="min-height:28px;font-weight:600;font-size:12px">${sw(c.color, OPA[KEY[c.id]])}${c.fr}<span class="muted" style="margin-left:auto;font-weight:400">${list.length}</span></div>`
|
||
for (const a of list) rows.push({ id: a.id, head, html: `<div class="arow ${a.id === o.sel ? 'on' : ''}" style="${o.big ? 'min-height:44px' : ''}"><span class="k">${KIND[a.kind]}</span><span class="n">${nameOf(a)}</span>${status(a.status)}</div>` })
|
||
}
|
||
// The list shows the selected row with its group header above it (as a scrolled list would).
|
||
const at = o.sel ? Math.max(0, rows.findIndex((r) => r.id === o.sel) - 1) : 0
|
||
const slice = rows.slice(at, at + (o.rows || 6))
|
||
const shown = slice[0].head + slice.map((r) => r.html).join('')
|
||
const list = `<div class="ocard" style="flex:1;min-height:0"><div class="ot">Annotations de la vue<span class="r">${countView(view)}</span></div><span class="inp" style="height:${o.big ? 44 : 36}px"><span class="muted s13">Filtrer par nom</span></span><div style="position:relative;display:flex;flex-direction:column;gap:1px">${shown}<span class="scrollbar" style="top:${o.sel ? 40 : 0}px;height:60px"></span></div></div>`
|
||
return `<div style="display:flex;flex-direction:column;gap:8px;height:100%">${views}${cats}${list}</div>`
|
||
}
|
||
|
||
// The workspace: strip across both columns, then (view chips, tool column + drawing, add row with the message slot) |
|
||
// overview. Widths as built: at 1 280 and 1 024 px the drawing is 538 × 403 (4:3) and the right column 352 (22rem);
|
||
// at 1 180 px the drawing is 694 × 520.
|
||
function ws(o) {
|
||
const cw = o.cw || 538, ch = o.ch || Math.round(cw * 3 / 4)
|
||
const canvas = `<div class="canvas" style="flex:none;width:${cw}px;height:${ch}px;background:#fff">${drawing({ w: cw, h: ch, vb: o.vb, view: o.view, faint: o.faint, hide: o.hide, extra: o.extra })}${o.over || ''}</div>`
|
||
const left = `<div style="display:flex;flex-direction:column;gap:8px;flex:none">${VIEWCHIPS(o.view || 'main', o.big)}<div style="display:flex;gap:8px">${toolCol(o.tool || 'select')}${canvas}</div>${ADDROW(o)}</div>`
|
||
return `${o.strip}<div style="display:flex;gap:16px;margin-top:10px;min-height:0;flex:1">${left}<div style="width:352px;flex:none;position:relative">${o.right || overview(o)}${o.dialog || ''}</div></div>`
|
||
}
|
||
// Desktop editor at 1 280 px: app sidebar shown (xl), five tabs, « Défaire » / « Refaire », the save line (R0, U1 as built).
|
||
function desk(o) {
|
||
return `<div class="frame desk" style="height:${o.h || 900}px">${side()}<div class="main">
|
||
<div class="top"><span class="crumb">${CRUMB}</span>${ME}</div>
|
||
${header(o)}${tabs('Annotations', o)}
|
||
<div class="work u2">${o.body}</div></div>${o.dim ? '<div class="dback"></div>' : ''}</div>`
|
||
}
|
||
// Tablet at 1 180 px: no sidebar (menu button, choice 10 b as built), same tab row.
|
||
function tablet(o) {
|
||
return `<div class="frame tab-frame" style="height:${o.h || 960}px"><div class="main">
|
||
<div class="top" style="padding:0 16px">${ico('menu')}<span class="crumb">Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b></span>${ME}</div>
|
||
${header(o)}${tabs('Annotations', o)}
|
||
<div class="work u2 tab">${o.body}</div></div>${o.dim ? '<div class="dback"></div>' : ''}</div>`
|
||
}
|
||
|
||
// Drawing marks (drawing units; u = units per screen px). Convention: grey dashed = the previous place; accent dashed
|
||
// over a white halo = a new shape waiting for its properties; red dashed = a place the core refused.
|
||
const RING = (a, u, r) => `<circle cx="${a.g[1]}" cy="${a.g[2]}" r="${(r || a.g[3]) + 6 * u}" fill="none" stroke="#1f1b16" stroke-width="${2.5 * u}"/>`
|
||
const GHOSTC = (x, y, r, u, k) => `<circle cx="${x}" cy="${y}" r="${r}" fill="${k.c}" fill-opacity="${k.o}" stroke="#fff" stroke-width="${6 * u}"/><circle cx="${x}" cy="${y}" r="${r}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${6 * u} ${4 * u}"/>`
|
||
const GHOSTP = (p, u, k) => `<polygon points="${pts(p)}" fill="${k.c}" fill-opacity="${k.o}" stroke="#fff" stroke-width="${6 * u}"/><polygon points="${pts(p)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${6 * u} ${4 * u}"/>`
|
||
const OLD = (g, u, fill) => g[0] === 'c' ? `<circle cx="${g[1]}" cy="${g[2]}" r="${g[3]}" fill="${fill || 'none'}" fill-opacity=".10" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${4 * u}"/>` : `<polygon points="${pts(g[1])}" fill="${fill || 'none'}" fill-opacity=".10" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${5 * u} ${4 * u}"/>`
|
||
const ICON_AT = (name, x, y, u, s = 22, color = '#1f1b16') => `<g transform="translate(${x - s * u / 2} ${y - s * u / 2}) scale(${s * u / 24})"><circle cx="12" cy="12" r="15" fill="#fff" stroke="${color}" stroke-width="1.4"/><use href="#i-${name}" width="24" height="24" stroke="${color}" fill="none" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></g>`
|
||
const ARROW = (x, y, u) => `<path d="M${x} ${y}l0 ${18 * u}l${5 * u} ${-5 * u}l${4 * u} ${8 * u}l${3 * u} ${-1.5 * u}l${-4 * u} ${-8 * u}l${7 * u} 0z" fill="#1f1b16" stroke="#fff" stroke-width="${1.2 * u}"/>`
|
||
// The finger: a grey contact disc (named in the captions).
|
||
const FINGER = (x, y, u) => `<circle cx="${x}" cy="${y}" r="${20 * u}" fill="rgba(31,27,22,.16)" stroke="rgba(31,27,22,.45)" stroke-width="${1.2 * u}"/>`
|
||
// The magnifier of the validated board 13: above the finger, the area under it at twice the size.
|
||
function LOUPE(x, y, u, inner, id, off) {
|
||
const cx = x, cy = y - (off || 70 * u), r = 38 * u
|
||
return `<defs><clipPath id="${id}"><circle cx="${cx}" cy="${cy}" r="${r}"/></clipPath></defs><circle cx="${cx}" cy="${cy}" r="${r + 3 * u}" fill="#fff" stroke="#1f1b16" stroke-width="${2 * u}"/><g clip-path="url(#${id})"><g transform="translate(${cx} ${cy}) scale(2) translate(${-x} ${-y})"><image href="${HORSE}" x="0" y="0" width="${W}" height="${H}"/>${inner}</g></g>`
|
||
}
|
||
const shift = (p, dx, dy) => p.map((q) => [q[0] + dx, q[1] + dy])
|
||
|
||
// Dialogs (Dialog as built: rounded-2xl, header with the h2 and a 44 px ✕ « Fermer », body, footer actions).
|
||
// Proposal A2: annotation dialogs open over the overview column, at its width, so the drawing is never covered.
|
||
function dlgBox(o) {
|
||
return `<div class="dlgu ${o.static ? 'static' : ''}" role="dialog" aria-modal="true" style="width:${o.w || 352}px;${o.style || ''}"><div class="dh"><h2>${o.title}</h2><span class="dx" title="Fermer">${ico('close')}</span></div><div class="db">${o.body}</div>${o.foot ? `<div class="df">${o.foot}</div>` : ''}</div>`
|
||
}
|
||
const fld = (label, val, o = {}) => `<div class="field"><label>${label}</label><span class="inp ${o.focus ? 'focus' : ''} ${o.bad ? 'bad' : ''}" style="${o.big ? 'height:44px;' : ''}"><span class="v">${val}</span>${o.sel ? `<span class="caret">${ico('down', 'sm')}</span>` : ''}</span>${o.hint ? `<span class="small muted">${o.hint}</span>` : ''}${o.err ? `<span class="ferr">${o.err}</span>` : ''}</div>`
|
||
const swc = (id) => { const c = DOC.categories.find((x) => x.id === id); return `${sw(c.color, OPA[KEY[c.id]])}${c.fr}` }
|
||
const CHOOSE = '<span class="muted">Choisir…</span>'
|
||
// Read mode (as R2's FindingView): kind + status, values as text; « Couleur » only when the annotation has its own
|
||
// colour (choice 11 b), « Région vertébrale » only when set; then the action rows.
|
||
function readBody(a, o = {}) {
|
||
const rows = [['Nom (FR)', a.fr], ['Nom (EN)', a.en], ['Catégorie', swc(a.cat)], ...(a.color ? [['Couleur', a.color]] : []), ['Latéralité', LAT[a.lat]], ...(a.region ? [['Région vertébrale', REGION[a.region]]] : []), ['Zone de constats', a.zoneFr || 'Aucune'], ['Vue', viewName(a.view)]]
|
||
const dl = `<dl class="rd">${rows.map(([k, v]) => `<dt>${k}</dt><dd>${v}</dd>`).join('')}</dl>`
|
||
const acts = o.ro ? '' : `<div class="racts"><div class="r1">${B('Modifier', 'secondary', { big: o.big, icon: 'pen', focus: o.focusEdit })}${B('Modifier la forme', 'secondary', { big: o.big, icon: a.kind === 'point' ? 'point' : 'zone' })}</div><div class="r2">${B(a.status === 'reviewed' ? 'Remettre à confirmer' : 'Marquer comme relu', 'secondary', { big: o.big, icon: 'check' })}${B('Supprimer', 'dangertxt', { big: o.big, icon: 'trash' })}</div></div>`
|
||
return `<div style="display:flex;align-items:center;gap:8px;font-size:13px"><span class="muted">${KIND[a.kind]}</span>${status(a.status)}</div>${dl}${acts}${o.saved ? '<div class="s13 muted" role="status">Modifications enregistrées</div>' : ''}`
|
||
}
|
||
const readDlg = (a, o = {}) => dlgBox({ title: nameOf(a), body: readBody(a, o), w: o.w, style: o.style, static: o.static })
|
||
// Edit form: the as-built field order (names, category, colour, laterality, vertebral region, findings zone).
|
||
function editBody(a, o = {}) {
|
||
return [fld('Nom (FR)', o.fr || a.fr, { focus: o.focus }), fld('Nom (EN)', a.en), fld('Catégorie', swc(a.cat), { sel: true }), fld('Couleur', '<span class="muted">Celle de la catégorie</span>', { hint: 'Laissez vide pour la couleur de la catégorie, ou indiquez une valeur hexadécimale (#rrggbb).' }), fld('Latéralité', LAT[a.lat], { sel: true }), fld('Région vertébrale', a.region ? REGION[a.region] : 'Aucune', { sel: true }), fld('Zone de constats', a.zoneFr || 'Aucune', { sel: true })].join('')
|
||
}
|
||
const DISCARD = `<div class="notice warn" style="flex-direction:column;align-items:stretch;gap:10px;width:100%"><b style="font-weight:600">Abandonner les modifications ?</b><div style="display:flex;gap:8px;justify-content:flex-end">${B('Continuer la saisie', 'secondary', { focus: true })}${B('Abandonner', 'danger')}</div></div>`
|
||
// Creation: the shape line first (with its way back to the drawing), then the fields in the edit form's order (minus
|
||
// the colour); footer « Abandonner » + « Créer » on one row, as R2's FormActions.
|
||
function createDlg(kind, o = {}) {
|
||
const geo = kind === 'point' ? `<div class="geo">${ico('point', 'sm')}<span>Point placé</span><a>Replacer le point</a></div>` : `<div class="geo">${ico('zone', 'sm')}<span>Zone tracée, ${o.n || 5} sommets</span><a>Reprendre le tracé</a></div>`
|
||
const body = [geo, fld('Nom (FR)', o.fr || '', { focus: o.focusName }), fld('Nom (EN)', o.en || ''), fld('Catégorie', swc(o.cat || DOC.categories[0].id), { sel: true }), fld('Latéralité', o.lat ? LAT[o.lat] : CHOOSE, { sel: true, bad: o.err, err: o.err ? 'Choisissez une latéralité.' : '' }), fld('Région vertébrale', CHOOSE, { sel: true }), fld('Zone de constats', CHOOSE, { sel: true })].join('')
|
||
const err = o.err ? '<div class="s13" role="alert" style="color:var(--color-danger-strong)">Choisissez la catégorie et la latéralité (et la vue ouverte pour un accès).</div>' : ''
|
||
return dlgBox({ title: kind === 'point' ? 'Nouveau point' : 'Nouvelle zone', body: body + err, w: o.w, style: o.style, static: o.static,
|
||
foot: o.discard ? DISCARD : `${B('Abandonner', 'ghost')}${B('Créer', 'primary')}` })
|
||
}
|
||
const vig = (label, inner, w) => `<div class="vign" style="${w ? `width:${w}px` : ''}"><div class="lbl">${label}</div>${inner}</div>`
|
||
// A drawing crop with its strip (the strip drawn at the crop's width), for the vignettes; o.msg goes under the drawing.
|
||
function crop(o) {
|
||
const w = o.w || 760, h = o.h || Math.round(w * o.vb[3] / o.vb[2])
|
||
return `<div class="frame" style="width:${w + 28}px;padding:14px;display:flex;flex-direction:column;gap:10px;${o.style || ''}">${o.strip || ''}<div class="canvas" style="flex:none;width:${w}px;height:${h}px;background:#fff;position:relative">${drawing({ w, h, vb: o.vb, view: o.view, faint: o.faint, hide: o.hide, extra: o.extra })}${o.over || ''}</div>${o.msg ? `<div style="display:flex">${o.msg}</div>` : ''}${o.after || ''}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 02 point creation -->
|
||
<div class="row"><div data-board="02-point-creation-desktop">
|
||
<p class="sheet-title">2. Ajouter un point : la taille se choisit dans le bandeau, un clic place le point, le dialogue « Nouveau point » s'ouvre seul sur la colonne de droite, le point reste visible</p>
|
||
<div id="b02"></div></div></div>
|
||
<script>
|
||
{
|
||
const vb = [1250, 760, 560, 420], vbc = [1330, 880, 400, 250]
|
||
const np = [1505, 1030], os = CATS.os
|
||
const NEW = { kind: 'point', fr: 'Tibia distal', cat: 'os', status: 'to_confirm', g: ['c', np[0], np[1], 34] }
|
||
const main = desk({ dim: true, body: ws({ vb, tool: 'point', faint: true, addOff: true,
|
||
strip: strip({ act: true, lead: lead2('point', 'Nouveau point', '', 'Point placé, en attente de ses propriétés'), actions: sizeSlider(34) }),
|
||
extra: (u) => GHOSTC(np[0], np[1], 34, u, os),
|
||
dialog: createDlg('point', { fr: 'Tibia distal|', en: 'Distal tibia', cat: 'os', focusName: true }) }) })
|
||
const preview = (u) => `<circle cx="${np[0] + 15}" cy="${np[1] + 10}" r="34" fill="none" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${6 * u} ${4 * u}"/><path d="M${np[0] + 15 - 10 * u} ${np[1] + 10}h${20 * u}M${np[0] + 15} ${np[1] + 10 - 10 * u}v${20 * u}" stroke="#1f1b16" stroke-width="${1.6 * u}"/>`
|
||
const a = vig('A. Outil Point : la taille vient du bandeau (la plus utilisée dans la vue, celle des articulations), l\'aperçu suit le pointeur', crop({ vb: vbc, faint: true,
|
||
strip: strip({ lead: lead2('point', 'Ajouter un point', '', 'Cliquez dans le dessin pour placer le point'), actions: sizeSlider(34) }), extra: preview }))
|
||
const c = vig('C. Après « Créer » : retour à Sélectionner, le point est sélectionné, le message sous le dessin propose « Défaire »', crop({ w: 930, vb: vbc,
|
||
strip: selStrip(NEW),
|
||
extra: (u) => `<circle cx="${np[0]}" cy="${np[1]}" r="34" fill="${os.c}" fill-opacity="${os.o}" stroke="${os.c}" stroke-width="${2 * u}"/>${RING(NEW, u)}`,
|
||
msg: msg('Point créé') }))
|
||
document.getElementById('b02').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1770px;align-items:flex-start">${a}${c}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Ordre :</b> géométrie d\'abord, propriétés ensuite. Le clic place le point à la taille du bandeau ; le dialogue s\'ouvre aussitôt sur la colonne de droite, à sa largeur (22 rem) : il ne couvre jamais le dessin, le point placé reste visible sous le voile, détouré de blanc et cerclé en pointillé. Pendant la création, les autres annotations sont estompées et ne se sélectionnent pas (A12).')}${note('<b>Dialogue « Nouveau point » :</b> la ligne « Point placé · Replacer le point » ramène au dessin en gardant la saisie (le point se glisse, puis « Revenir aux propriétés »). Catégorie préremplie avec la première, ici changée en Os : la couleur du point suit aussitôt. Latéralité sans valeur par défaut (A4). « Abandonner » retire le point et demande d\'abord si quelque chose a été saisi ; « Créer » écrit le point et ses propriétés en une modification (un seul « Défaire »).')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 03 point modification -->
|
||
<div class="row"><div data-board="03-point-modification-desktop">
|
||
<p class="sheet-title">3. Modifier un point : la sélection n'ouvre rien, le point se glisse, sa taille se règle au curseur du bandeau ; un clic sur le point déjà sélectionné ouvre ses propriétés</p>
|
||
<div id="b03"></div></div></div>
|
||
<script>
|
||
{
|
||
const vb = [1250, 760, 560, 420], vbc = [1330, 800, 400, 250]
|
||
const nw = [1478, 934]
|
||
const MOVED = { ...STIFLE, g: ['c', nw[0], nw[1], 34] }
|
||
const art = CATS.art
|
||
const at = (g, r) => `<circle cx="${g[0]}" cy="${g[1]}" r="${r}" fill="${art.c}" fill-opacity="${art.o}" stroke="${art.c}" stroke-width="2"/>`
|
||
const main = desk({ body: ws({ vb, hide: [STIFLE.fr], sel: 'stifle',
|
||
strip: selStrip(STIFLE),
|
||
extra: (u) => `${at(nw, 34)}${RING(MOVED, u)}`,
|
||
msg: msg('Point déplacé') }) })
|
||
const b = vig('B. Taille : le curseur s\'aimante sur les tailles de la vue (30 et 34), sans nombre ; le trait rouge est le minimum du cœur ; pendant le réglage, l\'ancienne taille reste en pointillé gris', crop({ w: 930, vb: vbc, hide: [STIFLE.fr],
|
||
strip: selStrip(STIFLE, { r: 30, focusSize: true }),
|
||
extra: (u) => `${OLD(STIFLE.g, u)}${at([STIFLE.g[1], STIFLE.g[2]], 30)}${RING(STIFLE, u, 30)}` }))
|
||
const c = vig('C. Clic sans déplacement sur le point déjà sélectionné, double-clic, Entrée sur sa ligne sélectionnée ou « Propriétés » : le dialogue s\'ouvre en lecture', readDlg(STIFLE, { static: true }), 360)
|
||
document.getElementById('b03').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1340px;align-items:flex-start">${b}${c}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Glisser :</b> appuyer sur le point puis bouger au-delà de 4 px (souris) le déplace ; pendant le geste, l\'ancienne place reste en pointillé gris (comme 06 A) et l\'aperçu suit le pointeur ; la position est proposée au cœur au relâchement (une modification, un « Défaire »). Un glisser n\'ouvre jamais le dialogue. Sans glisser : « Déplacer le point » ouvre le mode explicite et ses flèches (06 B, A11).')}${note('<b>Message :</b> « Point déplacé · Défaire », 6 s, dans la ligne sous le dessin (à droite des boutons d\'ajout), annoncé poliment, jamais par-dessus les poignées (A14) ; « Défaire » annule la même entrée que le bouton de l\'en-tête. <b>Bandeau :</b> nom et statut, type, curseur de taille, « Déplacer le point », « Propriétés », « Désélectionner ». Aucune coordonnée.')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 04 zone creation -->
|
||
<div class="row"><div data-board="04-zone-creation-desktop">
|
||
<p class="sheet-title">4. Ajouter une zone : un clic par sommet, commandes du tracé dans le bandeau ; à la fermeture, le dialogue « Nouvelle zone » s'ouvre seul et la forme reste dessinée</p>
|
||
<div id="b04"></div></div></div>
|
||
<script>
|
||
{
|
||
const vb = [1300, 840, 520, 390], vbc = [1340, 985, 360, 225]
|
||
const p = [[1430, 1060], [1500, 1035], [1585, 1050], [1610, 1110], [1570, 1180]]
|
||
const cur = [1470, 1172]
|
||
const os = CATS.os
|
||
const main = desk({ dim: true, body: ws({ vb, tool: 'zone', faint: true, addOff: true,
|
||
strip: strip({ act: true, lead: lead2('zone', 'Nouvelle zone', '', 'Tracé fermé, 5 sommets, en attente de ses propriétés') }),
|
||
extra: (u) => GHOSTP(p, u, os),
|
||
dialog: createDlg('zone', { fr: 'Tibia', en: 'Tibia', cat: 'os' }) }) })
|
||
const tracing = (u) => `<polygon points="${pts([...p, cur])}" fill="#b85a3f" fill-opacity=".12" stroke="none"/><polyline points="${pts(p)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/><path d="M${p[4]}L${cur}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${5 * u} ${4 * u}"/><path d="M${cur}L${p[0]}" stroke="#b85a3f" stroke-width="${1.2 * u}" stroke-dasharray="${3 * u} ${4 * u}" opacity=".6"/>${p.map((q) => V(q[0], q[1], u, false, false)).join('')}<circle cx="${p[0][0]}" cy="${p[0][1]}" r="${12 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>${ARROW(cur[0], cur[1], u)}`
|
||
const a = vig('A. Tracé en cours : bandeau fixe hors du dessin, annotations estompées et non sélectionnables', crop({ vb: vbc, faint: true,
|
||
strip: strip({ act: true, lead: lead2('zone', 'Ajouter une zone', '', '5 sommets posés'), actions: `${B('Fermer le tracé', 'primary', { icon: 'check' })}${B('Retirer le dernier sommet', 'secondary', { icon: 'undo' })}${B('Annuler le tracé', 'ghost')}` }), extra: tracing }))
|
||
const resumed = (u) => `<polygon points="${pts(p)}" fill="${os.c}" fill-opacity="${os.o}" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${6 * u} ${4 * u}"/>${polyEdit(p, u, {})}`
|
||
const c = vig('C. « Reprendre le tracé » : le dialogue se ferme, la saisie est gardée, la forme se corrige ; « Revenir aux propriétés » rouvre le dialogue', crop({ vb: vbc, faint: true,
|
||
strip: strip({ act: true, lead: lead2('zone', 'Nouvelle zone', '', 'Tracé repris, saisie gardée'), actions: `${B('Revenir aux propriétés', 'primary', { icon: 'file' })}${B('Abandonner', 'ghost')}` }), extra: resumed }))
|
||
document.getElementById('b04').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1600px">${a}${c}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Tracé :</b> un clic par sommet ; fermeture sur le premier sommet (cerclé), par Entrée ou « Fermer le tracé » (3 sommets au moins) ; Retour arrière ou « Retirer le dernier sommet » enlève le dernier ; Échap ou « Annuler le tracé » abandonne sans rien écrire. Le bandeau a une hauteur fixe : le dessin ne bouge pas quand il change.')}${note('<b>Fermeture :</b> le dialogue « Nouvelle zone » s\'ouvre sur la colonne de droite, la zone tracée reste visible (fond de sa catégorie, contour pointillé sur un détourage blanc). « Créer » écrit forme et propriétés en une modification. Une zone trop étroite est refusée à la fermeture : le tracé reste ouvert avec le message du cœur (33 A). Un accès suit le même parcours, dialogue « Nouvel accès ».')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 05 zone handles -->
|
||
<div class="row"><div data-board="05-zone-poignees-desktop">
|
||
<p class="sheet-title">5. Zone sélectionnée : sommets, « + » au milieu de chaque segment, bulle « − » sur le sommet choisi ; à la souris, glisser l'intérieur déplace la zone</p>
|
||
<div id="b05"></div></div></div>
|
||
<script>
|
||
{
|
||
const vb = [800, 345, 345, 259], vbc = [800, 345, 345, 259]
|
||
const thor = annById.thoracic, vert = CATS.vert
|
||
const main = desk({ body: ws({ vb, sel: 'thoracic',
|
||
strip: selStrip(thor, { vertex: 7 }),
|
||
extra: (u) => `${polyEdit(THOR, u, { on: 6 })}${ICON_AT('move', 965, 520, u, 26)}` }) })
|
||
const mid = [(THOR[1][0] + THOR[2][0]) / 2, (THOR[1][1] + THOR[2][1]) / 2]
|
||
const added = [THOR[0], THOR[1], mid, ...THOR.slice(2)]
|
||
const fill = (p) => `<polygon points="${pts(p)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="none"/>`
|
||
const a = vig('A. « + » ajoute un sommet au milieu du segment, aussitôt choisi pour être glissé', crop({ w: 392, vb: vbc, hide: [thor.fr],
|
||
extra: (u) => `${fill(added)}${polyEdit(added, u, { on: 2 })}`, msg: msg('Sommet ajouté') }))
|
||
const dragged = THOR.map((q, i) => i === 3 ? [q[0] - 18, q[1] + 26] : q)
|
||
const b = vig('B. Glisser un sommet : l\'ancien contour en pointillé gris, le cœur valide au relâchement', crop({ w: 392, vb: vbc, hide: [thor.fr],
|
||
extra: (u) => `${OLD(['p', THOR], u)}${fill(dragged)}${polyEdit(dragged, u, { on: 3, minus: false, noPlus: true })}${ARROW(dragged[3][0] + 4 * u, dragged[3][1] + 4 * u, u)}` }))
|
||
const removed = THOR.filter((_, i) => i !== 6)
|
||
const c = vig('C. « − » retire le sommet choisi', crop({ w: 392, vb: vbc, hide: [thor.fr],
|
||
extra: (u) => `${fill(removed)}${polyEdit(removed, u, {})}`, msg: msg('Sommet retiré') }))
|
||
document.getElementById('b05').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1304px;align-items:flex-start">${a}${b}${c}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Sur le dessin, sans dialogue :</b> un clic sur un sommet le choisit (plus grand, cerclé, bulle « − ») ; glisser un sommet ; « + » sur un segment ; « − » sur le sommet choisi ; à la souris, glisser l\'intérieur de la zone sélectionnée la déplace (choix 1 a, objectif U2 du plan UX). Chaque geste est une modification et un « Défaire ». Une zone garde au moins 3 sommets : à 3 sommets, la bulle « − » est grisée et inactive.')}${note('<b>Bandeau :</b> nom et statut, puis « Zone · 9 sommets · sommet 7 choisi » ; « Déplacer le sommet » (« Déplacer la zone » quand aucun sommet n\'est choisi), « Redessiner », « Propriétés », « Désélectionner ». Colonne de droite : la ligne de la zone est marquée. Priorité d\'un clic : poignées de la forme sélectionnée, puis autres annotations, puis intérieur de la forme sélectionnée (32). Zones à courbes : hors U2 (lot courbes).')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 06 move + redraw -->
|
||
<div class="row"><div data-board="06-zone-deplacer-redessiner-desktop">
|
||
<p class="sheet-title">6. Déplacer une zone (glisser direct à la souris ; mode explicite au doigt, au clavier ou par flèches) et la redessiner (l'ancien contour reste jusqu'à la fermeture)</p>
|
||
<div id="b06"></div></div></div>
|
||
<script>
|
||
{
|
||
const vbc = [760, 330, 440, 275]
|
||
const thor = annById.thoracic, vert = CATS.vert
|
||
const moved = shift(THOR, 28, -22)
|
||
const a = vig('A. Souris : glisser l\'intérieur de la zone sélectionnée la déplace tout de suite', crop({ w: 930, vb: vbc, hide: [thor.fr],
|
||
strip: selStrip(thor),
|
||
extra: (u) => `${OLD(['p', THOR], u)}<polygon points="${pts(moved)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${ICON_AT('move', 990, 470, u, 26)}`,
|
||
after: '<div class="s13 muted">Pendant le geste : ancienne place en pointillé gris. Au relâchement : « Zone déplacée · Défaire » sous le dessin.</div>' }))
|
||
const b = vig('B. « Déplacer la zone » : mode explicite, au doigt (glisser n\'importe où sur le dessin), au clavier (flèches) ou par les flèches du bandeau, sans glisser', crop({ w: 930, vb: vbc, hide: [thor.fr],
|
||
strip: strip({ act: true, lead: lead2('move', 'Déplacer la zone', '', 'Glissez n\'importe où, ou utilisez les flèches'), actions: `${ARROWS()}${B('Valider la position', 'primary', { icon: 'check' })}${B('Annuler', 'secondary')}` }),
|
||
extra: (u) => `${OLD(['p', THOR], u)}<polygon points="${pts(moved)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${FINGER(1120, 395, u)}`,
|
||
after: '<div class="s13 muted">Disque gris : le doigt, posé hors de la zone pour ne pas la cacher. Chaque flèche déplace d\'un pas ; Entrée ou « Valider la position » valide, Échap ou « Annuler » rend la place d\'avant. Même mode pour un point (« Déplacer le point ») et pour le sommet choisi (« Déplacer le sommet »).</div>' }))
|
||
const redraw = [[835, 430], [900, 470], [985, 488], [1070, 500], [1105, 520]]
|
||
const cur = [1092, 538]
|
||
const c = vig('C. « Redessiner » : nouveau tracé par-dessus l\'ancien contour, qui reste en repère jusqu\'à la fermeture', crop({ w: 930, vb: [760, 330, 440, 220], faint: true, hide: [thor.fr],
|
||
strip: strip({ act: true, lead: lead2('pen', 'Redessiner · Vertèbres thoraciques', '', '5 sommets posés'), actions: `${B('Fermer le tracé', 'primary', { icon: 'check' })}${B('Retirer le dernier sommet', 'secondary', { icon: 'undo' })}${B('Annuler le tracé', 'ghost')}` }),
|
||
extra: (u) => `${OLD(['p', THOR], u, vert.c)}<polyline points="${pts(redraw)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/><path d="M${redraw[4]}L${cur}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${5 * u} ${4 * u}"/>${redraw.map((q) => V(q[0], q[1], u)).join('')}<circle cx="${redraw[0][0]}" cy="${redraw[0][1]}" r="${12 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>${ARROW(cur[0], cur[1], u)}` }))
|
||
document.getElementById('b06').innerHTML = `<div style="display:flex;gap:20px;width:1340px;align-items:flex-start">${a}${note('<b>Déplacer :</b> un déplacement validé est une modification, un « Défaire ». Au doigt, hors du mode, un doigt sur l\'intérieur ne déplace rien (A13).', 'width:360px')}</div>`
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1340px;align-items:flex-start">${b}${note('<b>Sans glisser (WCAG 2.5.7) :</b> les flèches du bandeau, utilisables au doigt ou à la souris, remplacent le glisser pour la zone, le point et le sommet choisi (A11).', 'width:360px')}</div>`
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1340px;align-items:flex-start">${c}${note('<b>Redessiner :</b> à la fermeture, la nouvelle forme remplace l\'ancienne en une modification ; nom, catégorie, latéralité, région vertébrale, zone de constats et statut sont gardés. Un seul « Défaire » rend l\'ancienne forme. « Annuler le tracé » ou Échap : rien ne change. Une forme trop étroite est refusée : le tracé reste ouvert avec son message.', 'width:360px')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 13 tablet -->
|
||
<div class="row"><div data-board="13-tablette-tactile">
|
||
<p class="sheet-title">13. Tablette 1 180 px (au doigt) : poignées agrandies, cibles de 44 px dans tout l'onglet, loupe au-dessus du doigt ; toucher la zone sélectionnée ouvre ses propriétés</p>
|
||
<div id="b13"></div></div></div>
|
||
<script>
|
||
{
|
||
const vb = [800, 345, 345, 259]
|
||
const thor = annById.thoracic, vert = CATS.vert
|
||
const v2 = [THOR[2][0] + 10, THOR[2][1] + 14]
|
||
const P2 = THOR.map((q, i) => i === 2 ? v2 : q)
|
||
const main = tablet({ h: 1010, body: ws({ vb, cw: 694, big: true, sel: 'thoracic',
|
||
strip: selStrip(thor, { big: true, vertex: 3 }),
|
||
extra: (u) => `${OLD(['p', THOR], u)}${polyEdit(P2, u, { on: 2, big: true })}${HIT(THOR[7][0], THOR[7][1], u)}${FINGER(v2[0], v2[1], u)}${LOUPE(v2[0], v2[1], u, `<polygon points="${pts(P2)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${u}"/>${V(v2[0], v2[1], u / 2, true)}`, 'l13')}` }) })
|
||
const moved = shift(THOR, 24, -18)
|
||
const c = vig('C. Déplacer la zone au doigt : mode explicite, le doigt glisse n\'importe où (ici hors de la zone), flèches de 44 px', crop({ w: 760, vb: [760, 330, 440, 283], hide: [thor.fr],
|
||
strip: strip({ big: true, act: true, lead: lead2('move', 'Déplacer la zone', '', 'Glissez n\'importe où, ou utilisez les flèches'), actions: `${ARROWS(true)}${B('Valider la position', 'primary', { big: true, icon: 'check' })}${B('Annuler', 'secondary', { big: true })}` }),
|
||
extra: (u) => `${OLD(['p', THOR], u)}<polygon points="${pts(moved)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${FINGER(1110, 380, u)}` }))
|
||
const b = vig('B. Toucher la zone déjà sélectionnée (aucun sommet choisi) : propriétés en lecture, boutons de 44 px', readDlg(thor, { static: true, big: true }), 360)
|
||
const np = [STIFLE.g[1] + 16, STIFLE.g[2] + 12]
|
||
const art = CATS.art
|
||
const d = vig('D. Point au doigt : un doigt sur le point le déplace (loupe au-dessus), sa taille se règle au curseur de 44 px', crop({ w: 1000, vb: [1300, 800, 400, 250], hide: [STIFLE.fr],
|
||
strip: selStrip(STIFLE, { big: true }),
|
||
extra: (u) => `${OLD(STIFLE.g, u)}<circle cx="${np[0]}" cy="${np[1]}" r="34" fill="${art.c}" fill-opacity="${art.o}" stroke="${art.c}" stroke-width="2"/>${RING({ g: ['c', np[0], np[1], 34] }, u)}${FINGER(np[0], np[1], u)}${LOUPE(np[0], np[1], u, `<circle cx="${np[0]}" cy="${np[1]}" r="34" fill="${art.c}" fill-opacity="${art.o}" stroke="#1f1b16" stroke-width="${u}"/>`, 'l13d', 34 + 64 * u)}` }))
|
||
document.getElementById('b13').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1180px;align-items:flex-start">${b}${c}</div>`
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1180px;align-items:flex-start">${d}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1180px">${note('<b>Gestes :</b> toucher une annotation la sélectionne ; toucher l\'annotation déjà sélectionnée ouvre ses propriétés, sauf si un sommet est choisi (le toucher le déchoisit) ; un doigt sur une poignée ou sur le point le déplace, une loupe au-dessus du doigt montre l\'endroit caché (planche 13 validée) ; un doigt ailleurs ne déplace rien ; deux doigts zooment et font défiler (A13). Disque gris : le doigt. Sommet 18 px visibles, « + » 24 px, bulle « − » 44 × 36 px, chaque poignée répond dans un cercle de 44 px (pointillé sur un sommet) ; si deux poignées se chevauchent, la plus proche du doigt gagne.')}${note('<b>Mise en page :</b> comme construite à 1 180 px, sans barre latérale (bouton menu), dessin 694 px, colonne de droite 352 px ; toutes les cibles de l\'onglet passent à 44 px (puces de vue, ajout, filtre, lignes de la liste, bandeau, dialogue). Le dialogue s\'ouvre sur la colonne de droite, jamais sous le doigt. Seuil de glisser au doigt plus large qu\'à la souris (fixé au plan U2).')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 31 dialogs -->
|
||
<div class="row"><div data-board="31-dialogue-proprietes-etats">
|
||
<p class="sheet-title">31. Dialogue des propriétés : lecture, modification transactionnelle, sortie avec saisie en cours, suppression, lecture seule</p>
|
||
<div id="b31"></div></div></div>
|
||
<script>
|
||
{
|
||
const thor = annById.thoracic
|
||
const a = vig('A. Point, en lecture', readDlg(STIFLE, { static: true }), 360)
|
||
const b = vig('B. Zone, en lecture (après « Enregistrer »)', readDlg(thor, { static: true, saved: true }), 360)
|
||
const c = vig('C. « Modifier » : formulaire, un enregistrement = une modification', dlgBox({ static: true, title: STIFLE.fr, body: editBody(STIFLE, { focus: true }), foot: `${B('Annuler', 'ghost')}${B('Enregistrer', 'primary')}` }), 360)
|
||
const d = vig('D. Fermer (✕, Échap, Retour) avec une saisie en cours : la question remplace les boutons', dlgBox({ static: true, title: STIFLE.fr, body: editBody(STIFLE, { fr: 'Grasset (fémoro-tibiale)' }), foot: DISCARD }), 360)
|
||
const del = `<div style="position:relative;width:470px;height:470px">${readDlg(STIFLE, { static: true, style: 'width:352px' })}<div class="dback" style="border-radius:16px"></div>
|
||
<div class="dlgu" style="top:130px;left:11px;right:auto;width:448px"><div class="dh"><h2>Supprimer « ${STIFLE.fr} » ?</h2><span class="dx">${ico('close')}</span></div><div class="db"><div class="s14">Supprimer « ${STIFLE.fr} » du brouillon ?</div></div><div class="df">${B('Annuler', 'secondary')}${B('Supprimer', 'danger')}</div></div></div>`
|
||
const e = vig('E. « Supprimer » : confirmation existante, posée sur le dialogue', del, 470)
|
||
const f = vig('F. Fiche en lecture seule : valeurs seules, aucune action', readDlg(STIFLE, { static: true, ro: true }), 360)
|
||
document.getElementById('b31').innerHTML = `<div style="display:flex;gap:24px;width:1500px;align-items:flex-start">${a}${b}${c}${d}</div>`
|
||
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1500px;align-items:flex-start">${e}${f}<div style="display:flex;flex-direction:column;gap:12px;width:560px">${note('<b>Lecture d\'abord</b> (comme le dialogue d\'un constat, R2) : titre = nom de l\'annotation, type et statut, valeurs en texte ; « Couleur » n\'apparaît que si l\'annotation a sa propre couleur (choix 11 b), « Région vertébrale » seulement si elle est renseignée. Actions : « Modifier » et « Modifier la forme », puis « Marquer comme relu » (ou « Remettre à confirmer ») à gauche et « Supprimer » à droite. « Modifier la forme » ferme le dialogue, garde la sélection et met le focus sur la première poignée.')}${note('<b>Modifier :</b> formulaire transactionnel (aujourd\'hui chaque champ s\'écrit seul, une entrée d\'historique par champ) ; « Enregistrer » écrit tout en une modification, un seul « Défaire » ; « Annuler » revient à la lecture (libellés de R2). Couleur : champ actuel gardé, avec son aide (A9). Une saisie en cours n\'est jamais perdue sans question (« Continuer la saisie » ou « Abandonner »).')}${note('<b>Historique du navigateur :</b> le dialogue est une couche, comme celui d\'un constat ; Retour le ferme (en demandant d\'abord si une saisie est en cours). Le geste sur le dessin, le tracé et le mode « Déplacer » ne sont pas des entrées : Échap les termine.')}</div></div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 32 rules -->
|
||
<div class="row"><div data-board="32-ouverture-gestes-clavier">
|
||
<p class="sheet-title">32. Quand le dialogue s'ouvre, et quand il ne s'ouvre pas ; priorité d'un clic ; touche Échap ; clavier ; sans glisser ; retour du focus</p>
|
||
<div id="b32"></div></div></div>
|
||
<script>
|
||
{
|
||
const step = (n, t, cls = '') => `<div class="st ${cls}"><span class="no">${n}</span><span>${t}</span></div>`
|
||
const rec = `<div class="ccard" style="width:560px"><h2 style="font-size:18px">Proposé (arbitrage A1)</h2><div class="steps">
|
||
${step(1, 'Clic, toucher ou Entrée sur la ligne de la liste, <b>sans déplacement</b>, sur une annotation non sélectionnée : elle est sélectionnée (poignées, bandeau, ligne marquée). <b>Aucun dialogue.</b>', 'good')}
|
||
${step(2, 'Glisser le point, un sommet, « + », « − », ou l\'intérieur de la zone (souris) : le geste se fait aussitôt. Un appui qui bouge au-delà du seuil n\'ouvre jamais rien.', 'good')}
|
||
${step(3, 'Ouvrir les propriétés : clic sans déplacement sur l\'annotation <b>déjà sélectionnée</b> (hors poignée, et si aucun sommet n\'est choisi), double-clic sur une annotation, Entrée sur la ligne déjà sélectionnée, ou « Propriétés ».', 'good')}
|
||
${step(4, 'Création : « Nouveau point » ou « Nouvelle zone » s\'ouvre seul après le placement du point ou la fermeture du tracé.', 'good')}
|
||
</div><div class="s13 muted">Coût : un clic de plus pour lire les propriétés (le bandeau montre déjà le nom et le statut) ; un clic sur l'intérieur d'une zone sélectionnée ouvre le dialogue, d'où la règle : tant qu'un sommet est choisi, ce clic le déchoisit seulement.</div></div>`
|
||
const ori = `<div class="ccard" style="width:560px"><h2 style="font-size:18px">Orientation du 14 novembre, règles 1, 3 et 6</h2><div class="steps">
|
||
${step(1, 'Clic sans déplacement sur une annotation : elle est sélectionnée <b>et</b> son dialogue s\'ouvre en lecture (règle 1) ; Entrée sur une annotation focalisée l\'ouvre aussi (règle 6).')}
|
||
${step(2, 'Le dialogue est modal : tant qu\'il est ouvert, le dessin ne répond plus. Pour corriger la forme qu\'on vient de sélectionner, il faut d\'abord le fermer (✕ ou Échap).', 'bad')}
|
||
${step(3, 'Ensuite, les poignées de la forme sélectionnée se glissent sans dialogue (règle 3) : plusieurs gestes sur la même forme ne coûtent rien de plus.')}
|
||
${step(4, 'Corriger plusieurs zones à la suite : une fermeture de dialogue à chaque nouvelle sélection par clic.', 'bad')}
|
||
</div><div class="s13 muted">Coût : un dialogue à fermer après chaque sélection par clic. Le brief « sans que les modales gênent les gestes » porte sur ce cas : passer d'une forme à l'autre pour les corriger.</div></div>`
|
||
const prio = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Priorité d'un clic ou d'un toucher sur le dessin</div><table class="esc">${[
|
||
['Poignées de la forme sélectionnée', 'sommet, « + », bulle « − » (cercle de 44 px au doigt)'],
|
||
['Autre annotation sous le pointeur', 'la sélectionne (un point posé dans la zone sélectionnée passe avant elle)'],
|
||
['Intérieur de la forme sélectionnée', 'déchoisit le sommet choisi, sinon ouvre les propriétés'],
|
||
['Dessin vide', 'désélectionne (comme aujourd\'hui)'],
|
||
].map(([s, e], i) => `<tr><td class="n">${i + 1}</td><td style="width:210px"><b style="font-weight:600">${s}</b></td><td>${e}</td></tr>`).join('')}</table></div>`
|
||
const escRows = [
|
||
['Dialogue ouvert', 'le ferme ; une saisie en cours demande d\'abord', 'Propriétés, Nouveau point, Supprimer'],
|
||
['Volet contextuel', 'ferme le volet, focus sur son déclencheur', 'Références d\'un constat'],
|
||
['Création en cours', 'demande d\'abord si une saisie ou une forme existe, puis abandonne la création', 'tracé d\'une nouvelle forme, « Replacer le point », « Reprendre le tracé »'],
|
||
['Redessin ou mode « Déplacer »', 'l\'abandonne, la forme d\'avant reste', 'Redessiner, Déplacer la zone'],
|
||
['Sommet choisi', 'le déchoisit, la zone reste sélectionnée', 'bulle « − » visible'],
|
||
['Sélection', 'désélectionne', 'Annotation sélectionnée'],
|
||
]
|
||
const esc = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Touche Échap : la première situation qui s'applique la consomme</div><table class="esc"><tr><th></th><th>Situation</th><th>Échap</th><th>Exemples</th></tr>${escRows.map(([s, e, x], i) => `<tr><td class="n">${i + 1}</td><td><b style="font-weight:600">${s}</b></td><td>${e}</td><td class="muted">${x}</td></tr>`).join('')}</table><div class="small muted" style="margin-top:8px">Une création en cours compte ses deux moments : le tracé d'une nouvelle forme, et la forme reprise après « Replacer le point » ou « Reprendre le tracé ». Pendant une création, onglets, puces de vue, outils et Retour demandent d'abord ; « Défaire » est inactif.</div></div>`
|
||
const kRows = [
|
||
['Sélectionner une annotation', 'Tab jusqu\'à sa ligne dans « Annotations de la vue », Entrée'],
|
||
['Ouvrir ses propriétés', 'Entrée sur la ligne déjà sélectionnée, ou « Propriétés »'],
|
||
['Passer aux poignées', '« Modifier la forme » (dialogue) : focus sur la première poignée ; Tab et Maj+Tab de l\'une à l\'autre, « + » compris'],
|
||
['Déplacer point, sommet ou zone', 'flèches (Maj : pas de 10) ; une série de touches = une modification, écrite au relâchement'],
|
||
['Ajouter, retirer un sommet', 'Entrée ou Espace sur un « + » ; Inser ajoute après le sommet choisi ; Suppr le retire'],
|
||
['Taille d\'un point', 'curseur du bandeau : flèches, Page haut et Page bas pour le cran suivant'],
|
||
['Créer une zone au clavier', '« Ajouter une zone » pose un triangle au centre et ouvre « Nouvelle zone » ; la forme se corrige ensuite par ses poignées'],
|
||
['Valider, annuler', 'Entrée valide un tracé ou un déplacement ; Échap l\'annule'],
|
||
]
|
||
const keys = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Clavier (WCAG 2.1.1)</div><table class="esc">${kRows.map(([s, e]) => `<tr><td style="width:190px"><b style="font-weight:600">${s}</b></td><td>${e}</td></tr>`).join('')}</table><div class="small muted" style="margin-top:8px">Sans poignée focalisée, les flèches font toujours défiler le dessin, comme aujourd'hui.</div></div>`
|
||
const pRows = [
|
||
['Déplacer une zone, un point, le sommet choisi', '« Déplacer la zone », « Déplacer le point » ou « Déplacer le sommet », puis les flèches du bandeau et « Valider la position » (A11)'],
|
||
['Ajouter, retirer un sommet', '« + » et « − » sont des clics'],
|
||
['Taille d\'un point', 'un clic sur la piste du curseur l\'y amène'],
|
||
['Changer toute la forme', '« Redessiner » : un clic par sommet'],
|
||
]
|
||
const ptr = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Pointeur sans glisser (WCAG 2.5.7)</div><table class="esc">${pRows.map(([s, e]) => `<tr><td style="width:190px"><b style="font-weight:600">${s}</b></td><td>${e}</td></tr>`).join('')}</table></div>`
|
||
const fRows = [
|
||
['Dialogue de propriétés ouvert', 'premier contrôle du dialogue (règle du dialogue natif, D13)'],
|
||
['Dialogue fermé, ouvert par « Propriétés »', 'le bouton « Propriétés »'],
|
||
['Dialogue fermé, ouvert depuis le dessin ou la liste', 'la ligne de l\'annotation dans la liste ; si un filtre la cache, le dessin'],
|
||
['« Modifier la forme »', 'la première poignée de la forme sélectionnée'],
|
||
['« Créer » réussi', 'la ligne de la nouvelle annotation (sélectionnée)'],
|
||
['« Abandonner » une création', 'le bouton de l\'outil, ou « Ajouter un point / une zone » au clavier'],
|
||
]
|
||
const focus = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Retour du focus</div><table class="esc">${fRows.map(([s, e]) => `<tr><td style="width:240px"><b style="font-weight:600">${s}</b></td><td>${e}</td></tr>`).join('')}</table></div>`
|
||
document.getElementById('b32').innerHTML = `<div style="display:flex;gap:24px;width:1150px;align-items:stretch">${rec}${ori}</div>`
|
||
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1150px;align-items:flex-start">${prio}${esc}</div>`
|
||
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1150px;align-items:flex-start">${keys}<div style="display:flex;flex-direction:column;gap:20px">${ptr}${focus}</div></div>`
|
||
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1150px">${note('<b>Seuil :</b> un appui devient un geste au-delà de 4 px à la souris (valeur actuelle) ; au doigt, un seuil plus large évite qu\'un toucher tremblé déplace une forme (valeur fixée au plan U2). Un geste n\'ouvre jamais de dialogue, un dialogue n\'apparaît jamais pendant un geste. <b>Ce qui ne change pas :</b> « Défaire » et « Refaire » dans l\'en-tête, inactifs pendant qu\'un dialogue est ouvert, comme aujourd\'hui.')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 33 states -->
|
||
<div class="row"><div data-board="33-refus-et-etats">
|
||
<p class="sheet-title">33. Refus et états : fermeture refusée, latéralité manquante, déplacement refusé, trop de sommets, lecture seule</p>
|
||
<div id="b33"></div></div></div>
|
||
<script>
|
||
{
|
||
const vbc = [1330, 880, 400, 250]
|
||
const sliver = [[1400, 1000], [1600, 1010], [1602, 1016], [1402, 1007]]
|
||
const a = vig('A. Fermeture refusée par le cœur : le tracé reste ouvert avec ses commandes, le message est dans le bandeau', crop({ w: 958, vb: vbc, faint: true,
|
||
strip: strip({ alert: true, lead: lead2('alert', 'Fermeture refusée', '', '4 sommets posés'), text: 'L\'intérieur d\'une zone est trop étroit pour être touché sur mobile.', actions: `${B('Fermer le tracé', 'primary', { icon: 'check' })}${B('Retirer le dernier sommet', 'secondary', { icon: 'undo' })}${B('Annuler le tracé', 'ghost')}` }),
|
||
extra: (u) => `<polygon points="${pts(sliver)}" fill="#b85a3f" fill-opacity=".14" stroke="#b85a3f" stroke-width="${2.5 * u}"/>${sliver.map((q) => V(q[0], q[1], u)).join('')}` }))
|
||
const b = vig('B. « Créer » sans latéralité : le champ le dit, rien n\'est écrit', createDlg('point', { static: true, fr: 'Tibia distal', en: 'Distal tibia', cat: 'os', err: true }), 360)
|
||
const c = vig('C. Déplacement refusé : le point garde sa place, le message le dit sous le dessin', crop({ w: 930, vb: [1330, 780, 400, 250],
|
||
strip: selStrip(STIFLE),
|
||
extra: (u) => `${RING(STIFLE, u)}<circle cx="${STIFLE.g[1] + 150}" cy="${STIFLE.g[2] - 120}" r="34" fill="none" stroke="#c0392b" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${4 * u}"/>`,
|
||
msg: msg('Déplacement refusé : le point ne tient pas à l\'endroit choisi. Il garde sa place.', { err: true }) }))
|
||
const cerv = annById.cervical
|
||
const d = vig('D. Plafond de poignées (T18) : au-delà, contour de sélection sans poignée et message ; déplacer et redessiner restent possibles', crop({ w: 930, vb: [380, 180, 560, 350], hide: [cerv.fr],
|
||
strip: selStrip(cerv, { sub: `Zone · ${cerv.g[1].length} sommets, trop pour les poignées` }),
|
||
extra: (u) => `<polygon points="${pts(cerv.g[1])}" fill="${CATS.vert.c}" fill-opacity="${CATS.vert.o}" stroke="none"/>${SEL(cerv.g[1], u)}` }))
|
||
const e = vig('E. Fiche en lecture seule : le bandeau le dit ; sélection et propriétés en lecture, ni poignée ni curseur', crop({ w: 760, vb: [1330, 780, 400, 250],
|
||
strip: selStrip(STIFLE, { ro: true }), extra: (u) => RING(STIFLE, u) }))
|
||
document.getElementById('b33').innerHTML = `<div style="display:flex;gap:20px;width:1720px;align-items:flex-start">${a}${b}</div>`
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1720px;align-items:flex-start">${d}${note('<b>Plafond (T18) :</b> le nombre est fixé au plan U2 à partir des formes équines, avec une marge ; aucune zone équine ne l\'atteint (la zone cervicale, 17 sommets, sert ici d\'illustration).<br><br><b>Messages :</b> les refus viennent du cœur, avec ses mots, comme aujourd\'hui (texte de C : exemple ; le texte de A est celui de l\'application, écrit pour le téléphone). Le bandeau garde sa hauteur quand il passe en refus. Un refus d\'un geste rend la forme exacte d\'avant.', 'width:420px')}</div>`
|
||
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1780px;align-items:flex-start">${c}${e}</div>`
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|