Audio Wave: hide the raw segments_json widget (it's driven by the waveform)

This commit is contained in:
2026-07-04 23:02:42 +02:00
parent d9579e4794
commit e63f6e6058
+4
View File
@@ -45,6 +45,10 @@ function setupWave(node) {
node.addDOMWidget("wave", "wave", wrap, { serialize: false });
const ctx = canvas.getContext("2d");
// Hide the raw segments_json widget — it's machine data driven by the waveform.
const sjw = getW(node, "segments_json");
if (sjw) { sjw.hidden = true; sjw.computeSize = () => [0, -4]; }
const t2x = (t) => (st.duration ? (t / st.duration) * canvas.width : 0);
const x2t = (x) => (st.duration ? (x / canvas.width) * st.duration : 0);
const starts = () => [0, ...st.boundaries.slice().sort((a, b) => a - b)];