Unverified Commit 011b11d8 authored by bymyself's avatar bymyself Committed by GitHub
Browse files

LoadAudio restores file value from workflow (#4043)

* LoadAudio restores file value from workflow

* use onAfterGraphConfigured

* Don't use anonnymous function
parent ff6ca2a8
...@@ -149,6 +149,15 @@ app.registerExtension({ ...@@ -149,6 +149,15 @@ app.registerExtension({
} }
audioWidget.callback = onAudioWidgetUpdate audioWidget.callback = onAudioWidgetUpdate
// Load saved audio file widget values if restoring from workflow
const onGraphConfigured = node.onGraphConfigured;
node.onGraphConfigured = function() {
onGraphConfigured?.apply(this, arguments)
if (audioWidget.value) {
onAudioWidgetUpdate()
}
}
const fileInput = document.createElement("input") const fileInput = document.createElement("input")
fileInput.type = "file" fileInput.type = "file"
fileInput.accept = "audio/*" fileInput.accept = "audio/*"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment