LoadAudio restores file value from workflow (#4043)

* LoadAudio restores file value from workflow

* use onAfterGraphConfigured

* Don't use anonnymous function
main
bymyself 7 months ago committed by GitHub
parent ff6ca2a892
commit 011b11d8d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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/*"

Loading…
Cancel
Save