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:
@@ -118,6 +118,7 @@ describe("sanitizeRenderSettings", () => {
|
||||
arrowLength: 3,
|
||||
labelZoom: 2,
|
||||
labelSize: 4,
|
||||
showSupports: false,
|
||||
clusterLabels: false,
|
||||
clusterLabelSize: 20,
|
||||
regions: DEFAULT_REGION_TUNING,
|
||||
@@ -126,6 +127,16 @@ describe("sanitizeRenderSettings", () => {
|
||||
assert.deepEqual(sanitizeRenderSettings(valid), valid); // every value a ladder member
|
||||
});
|
||||
|
||||
test("showSupports (2026-09-29): boolean-only, default on — the draw toggle", () => {
|
||||
// A render-only hide for supports edges: anything but a real boolean
|
||||
// (missing key, legacy file, garbage) loads as ON (today's look); a
|
||||
// real false round-trips untouched.
|
||||
assert.equal(sanitizeRenderSettings({}).showSupports, true);
|
||||
assert.equal(sanitizeRenderSettings({ showSupports: false }).showSupports, false);
|
||||
assert.equal(sanitizeRenderSettings({ showSupports: "no" }).showSupports, true);
|
||||
assert.equal(sanitizeRenderSettings({ showSupports: 0 }).showSupports, true);
|
||||
});
|
||||
|
||||
test("the pre-2026-09-13 stored shape (flat, no regions/physics) still loads", () => {
|
||||
// data/render-settings.json on disk predates the nested sections —
|
||||
// those loads must get defaults, not crash, not shift anything.
|
||||
|
||||
Reference in New Issue
Block a user