User-tuned defaults, label-size floor 1, cluster glow removed

- Defaults per user: nodeSize 2, edgeWidth 1, arrowLength 2, labelSize 2
  (labelZoom 0.5 stays — reads as the "1x" they confirmed good).
- Label size slider floor 3 -> 1 so the default 2 is not the smallest
  value; sanitize clamp widened to match.
- Cluster hull glow (layered low-alpha fills) removed for now: it read as
  jagged up close (straight-line hull approximation at high zoom) and
  does not belong until the layout settles. The solid viewer-relative
  border and the inverse-gated region labels stay. HULL_FILL_LAYERS
  constant deleted; hullShapes cache carries only the stroke path now.
- Saved render-settings.json reset so the new defaults apply on next load.
EOF
This commit is contained in:
amosblomqvist
2026-09-13 07:40:58 +03:00
parent c096854e87
commit 6692b19a53
3 changed files with 13 additions and 28 deletions
+4 -4
View File
@@ -34,11 +34,11 @@ export interface GraphRenderSettings {
// were calibrated in the screen-fixed era, so everything rendered ~2x
// too big once sizes started scaling with the graph.
export const DEFAULT_RENDER_SETTINGS: GraphRenderSettings = {
nodeSize: 4,
nodeSize: 2,
edgeWidth: 1,
arrowLength: 4,
arrowLength: 2,
labelZoom: 0.5,
labelSize: 7,
labelSize: 2,
clusterLabels: true,
};
@@ -61,7 +61,7 @@ export function sanitizeRenderSettings(raw: unknown): GraphRenderSettings {
arrowLength: num(r.arrowLength, DEFAULT_RENDER_SETTINGS.arrowLength, 1, 15),
// Range matches the log slider's span [LABEL_ZOOM_MIN, LABEL_ZOOM_MAX].
labelZoom: num(r.labelZoom, DEFAULT_RENDER_SETTINGS.labelZoom, 0.0625, 4),
labelSize: num(r.labelSize, DEFAULT_RENDER_SETTINGS.labelSize, 3, 24),
labelSize: num(r.labelSize, DEFAULT_RENDER_SETTINGS.labelSize, 1, 24),
clusterLabels:
typeof r.clusterLabels === "boolean" ? r.clusterLabels : DEFAULT_RENDER_SETTINGS.clusterLabels,
};