Fix preview on node-add, consistent naming

When a Load Video node is added, the default video selection is now
properly displayed with a preview.

Context menu options now consistently use preview instead of video as
the actions apply to animated images as well.
This commit is contained in:
Austin Mroz
2023-10-28 15:24:59 -05:00
parent 68b66e7e3e
commit d51cb7c7a9
+4 -2
View File
@@ -443,13 +443,13 @@ function addPreviewOptions(nodeType) {
//url.searchParams.delete('preview')
optNew.push(
{
content: "Open Video",
content: "Open preview",
callback: () => {
window.open(url, "_blank")
},
},
{
content: "Save Video",
content: "Save preview",
callback: () => {
const a = document.createElement("a");
a.href = url;
@@ -539,6 +539,8 @@ app.registerExtension({
return pathWidget._value;
}
});
//Set value to ensure preview displays on initial add.
pathWidget.value = pathWidget._value;
});
} else if (nodeData?.name == "VHS_VideoCombine") {
addDateFormatting(nodeType, "filename_prefix");