From f76583a33eccf62b172f455b6044450e87f5419e Mon Sep 17 00:00:00 2001 From: joren Date: Mon, 30 Mar 2026 01:10:46 +0200 Subject: [PATCH] feat: buffer/latency control + non-selectable node text Buffer Control: - GET /api/quantum - reads current graph quantum via pw-metadata - POST /api/quantum {quantum:N} - sets quantum via pw-metadata - Toolbar dropdown with presets: 32, 64, 128, 256, 512, 1024, 2048, 4096 - Loads current quantum on startup Text Selection Fix: - Added user-select: none to wrap and canvas CSS - Node text no longer gets selected when dragging --- frontend/src/components/GraphCanvas.svelte | 23 ++++++++++++-- frontend/src/lib/stores.ts | 21 +++++++++++++ src/web_server.cpp | 36 ++++++++++++++++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/GraphCanvas.svelte b/frontend/src/components/GraphCanvas.svelte index c5b089f..94a398b 100644 --- a/frontend/src/components/GraphCanvas.svelte +++ b/frontend/src/components/GraphCanvas.svelte @@ -13,6 +13,7 @@ saveProfile, loadProfile, deleteProfile, setNodeVolume, setNodeMute, createNullSink, createLoopback, loadModule, + getQuantum, setQuantum, } from '../lib/stores'; import type { Node, Port, Link } from '../lib/types'; @@ -50,6 +51,7 @@ // Positions let nodePositions = $state>({}); + let currentQuantum = $state(0); const POS_KEY = 'pwweb_positions'; function loadPositions() { @@ -420,7 +422,7 @@ } } - onMount(() => { initGraph(); loadPositions(); }); + onMount(() => { initGraph(); loadPositions(); getQuantum().then(q => { currentQuantum = q; }); }); onDestroy(() => { destroyGraph(); }); @@ -460,6 +462,15 @@ + + {$nodes.length}N {$ports.length}P {$links.length}L {#if $patchbay.pinned_connections.length > 0}{$patchbay.pinned_connections.length}p{/if} @@ -821,8 +832,8 @@