Wire the Remove cutaway button

Clears the cutaway from the shot so it is not cut into the film. The subject
stays, so Make cutaway can try again with a different draw.
This commit is contained in:
gator 2026-09-15 02:05:20 +00:00
parent 58ccf6fc6d
commit 4292624eda

View file

@ -720,6 +720,26 @@ function wire(locked) {
}); });
}); });
// Throwing a cutaway away. The picture is drawn from the writer's guess at
// what the line is about, so a wrong one is common and there was no way to
// get rid of it - only to redraw and hope.
[].forEach.call(document.querySelectorAll("[data-brollrm]"), function (b) {
b.addEventListener("click", async function () {
hideMsg("msg");
var idx = parseInt(b.getAttribute("data-brollrm"), 10);
b.disabled = true; b.textContent = "Removing…";
var r = await api("update_shot", { email: email, project_id: pid,
index: idx, broll_clear: true });
if (!r.ok) {
b.disabled = false; b.textContent = "Remove cutaway";
showMsg("msg", r.error || "Could not remove that.");
return;
}
showMsg("msg", "Cutaway removed from shot " + idx + ".", "ok");
load();
});
});
[].forEach.call(document.querySelectorAll("[data-broll]"), function (b) { [].forEach.call(document.querySelectorAll("[data-broll]"), function (b) {
b.addEventListener("click", async function () { b.addEventListener("click", async function () {
hideMsg("msg"); hideMsg("msg");