Compare commits

...
1 Commits
Author SHA1 Message Date
ausboss a9d741f563 Timing card: empty boxes before a video is chosen
With no source the three boxes showed 0, a "linked" button each and two
blank note buttons. They are empty and read-only until a video loads.
2026-11-14 06:05:16 -06:00
+12
View File
@@ -451,6 +451,7 @@ export function mountTransformTrim({ get, set, has = () => true, driven = () =>
useStart.title = locked("start") ? lockTip("start") : "Start the clip at the frame on the stage. The Duration stays.";
}
if (clip.count) syncFields(clip, current, wired, unknown);
else emptyFields();
if (controls.reset) {
const free = current.mode !== "wired";
controls.reset.textContent = free ? "Whole video" : "To start";
@@ -737,6 +738,17 @@ export function mountTransformTrim({ get, set, has = () => true, driven = () =>
});
};
// No video yet: empty boxes, nothing linked, no note.
const emptyFields = () => {
const seconds = getUnits() !== "f";
for (const button of unitPill.children) button.classList.toggle("on", button.dataset.units === (seconds ? "s" : "f"));
for (const key of Object.keys(fields)) {
showField(key, { value: null, unit: seconds ? "s" : "fr", decimals: 0, sub: "Choose a video first.", lockedBy: null, readOnly: true });
}
showNote("");
publish?.(null);
};
const syncFields = (clip, current, wired, unknown) => {
const seconds = getUnits() !== "f";
for (const button of unitPill.children) button.classList.toggle("on", button.dataset.units === (seconds ? "s" : "f"));