fix: audio regions editable state

feat/type-attributes
Tomáš Mládek 2023-01-28 20:43:11 +01:00
parent 0598420a83
commit 50386c53b1
1 changed files with 5 additions and 3 deletions

View File

@ -62,6 +62,8 @@
color: annotation.get("COLOR") || DEFAULT_ANNOTATION_COLOR, color: annotation.get("COLOR") || DEFAULT_ANNOTATION_COLOR,
attributes: { "upend-id": annotation.address }, attributes: { "upend-id": annotation.address },
data: (annotation.attr["LBL"] || [])[0]?.value, data: (annotation.attr["LBL"] || [])[0]?.value,
drag: editable,
resize: editable,
...fragment, ...fragment,
} as RegionParams); } as RegionParams);
} }
@ -105,9 +107,9 @@
} else { } else {
wavesurfer.disableDragSelection(); wavesurfer.disableDragSelection();
} }
regions.forEach((region) => regions.forEach((region) => {
region.update({ drag: detail, resize: detail }) region.update({ drag: editable, resize: editable });
); });
} }
async function updateAnnotation(region: Region) { async function updateAnnotation(region: Region) {