supports-edges draw toggle — last row of the graph settings' first section
Off hides supports edges from the canvas: the renderer skips them when building the shaft/head paths (draw-only — the physics sim still feels them and detail cards still list them; settings never shift the graph). Server-persisted with the rest (render-settings.json); sanitizer takes real booleans only, anything else (missing key, legacy file) loads ON — today's look. Toggle row styled as the Background-colors row; sanitiser pinned in render-settings.test.
This commit is contained in:
@@ -1232,11 +1232,14 @@ export class GraphCanvasRenderer {
|
||||
// Edge shafts + arrowheads: tip lands on the target disc edge. Both
|
||||
// relation types draw the same arrow for now — the double-shaft
|
||||
// glyph was rejected (2026-09-15); differentiation is pending a new
|
||||
// approach. CanvasEdge.type is plumbed for whatever comes next.
|
||||
// approach. CanvasEdge.type is plumbed for whatever comes next —
|
||||
// except the supports draw toggle (owner, 2026-09-29): off skips
|
||||
// the paths entirely (a draw-only hide; the sim still feels them).
|
||||
const arrowLen = settings.arrowLength;
|
||||
const shafts = new Path2D();
|
||||
const heads = new Path2D();
|
||||
for (const e of data.edges) {
|
||||
if (!settings.showSupports && e.type === "supports") continue;
|
||||
if (!isVisible(e.from) || !isVisible(e.to)) continue;
|
||||
const a = this.nodeById.get(e.from);
|
||||
const b = this.nodeById.get(e.to);
|
||||
|
||||
@@ -51,7 +51,9 @@
|
||||
*
|
||||
* Rendering settings (2026-09-13): the gear in the search panel reveals
|
||||
* five sliders (node size, edge width, arrowhead length, label size, the
|
||||
* zoom threshold) plus the cluster-labels checkbox. SERVER-persisted
|
||||
* zoom threshold), the supports-edges draw toggle (2026-09-29: off hides
|
||||
* supports edges from the canvas — draw-only; physics and detail cards
|
||||
* still see them), and the cluster-labels checkbox. SERVER-persisted
|
||||
* (data/render-settings.json via /api/graph/render-settings): loaded
|
||||
* once after mount, saved debounced on every user change — one source
|
||||
* of truth shared by every browser. The label-zoom slider is log-scaled
|
||||
@@ -528,6 +530,20 @@ function GraphSettingsControl({
|
||||
onChange={(p) =>
|
||||
changeSettings((cur) => ({ ...cur, labelZoom: fromLadderPosition(p, LABEL_ZOOM_LADDER) }))}
|
||||
/>
|
||||
{/* Supports draw toggle (owner, 2026-09-29): hides the single-line
|
||||
supports edges from the canvas — follows (⟹-meant) stay. Draw-only:
|
||||
physics + detail cards still see them. Last row of the FIRST
|
||||
section; the border-t below starts Regions. */}
|
||||
<label className="flex cursor-pointer items-center justify-between text-[11px] text-muted-foreground">
|
||||
<span>Supports edges</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={settings.showSupports}
|
||||
onChange={(e) =>
|
||||
changeSettings((cur) => ({ ...cur, showSupports: e.target.checked }))}
|
||||
className="accent-primary"
|
||||
/>
|
||||
</label>
|
||||
{/* Regions: the blurred cluster tints. Sliders + a fixed-set
|
||||
dropdown for the bitmap resolution (it's a discrete
|
||||
choice, not a free number). Server-persisted like the
|
||||
|
||||
Reference in New Issue
Block a user