Audio Wave: hide the raw segments_json widget (it's driven by the waveform)
This commit is contained in:
@@ -45,6 +45,10 @@ function setupWave(node) {
|
|||||||
node.addDOMWidget("wave", "wave", wrap, { serialize: false });
|
node.addDOMWidget("wave", "wave", wrap, { serialize: false });
|
||||||
const ctx = canvas.getContext("2d");
|
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 t2x = (t) => (st.duration ? (t / st.duration) * canvas.width : 0);
|
||||||
const x2t = (x) => (st.duration ? (x / canvas.width) * st.duration : 0);
|
const x2t = (x) => (st.duration ? (x / canvas.width) * st.duration : 0);
|
||||||
const starts = () => [0, ...st.boundaries.slice().sort((a, b) => a - b)];
|
const starts = () => [0, ...st.boundaries.slice().sort((a, b) => a - b)];
|
||||||
|
|||||||
Reference in New Issue
Block a user